blob: d764f4a2fc946207298078ba427d499ee5d52f20 [file] [log] [blame]
Sean Condon74e8d942022-03-16 19:20:08 +00001# SPDX-FileCopyrightText: 2022-present Open Networking Foundation <info@opennetworking.org>
2#
3# SPDX-License-Identifier: Apache-2.0
4
5package aether_2_1_x
6
7echo[config] {
8 config := input
9}
10
11allowed[config] {
12 enterprise := enterprise_rule
13 config := {
14 "connectivity_services": object.get(input, "connectivity_services", {}),
15 "enterprises": {
16 "enterprise": [
17 enterprise
18 ]
19 }
20 }
21}
22
23enterprise_rule[enterprise] {
24 enterprise := input.enterprises.enterprise[_]
25 ["AetherROCAdmin", enterprise.enterprise_id][_] == input.groups[i]
26}
27
28can_update_enterprise = true {
29 update_enterprise := input.updates.enterprises.enterprise[_]
30 ["AetherROCAdmin", update_enterprise.enterprise_id][_] == input.groups[i]
31}