@@ -31,12 +31,12 @@ import rego.v1
3131
3232# bool_flip lets you assign a value to an inverted bool.
3333# You cannot do 'x := !false', but you can do 'x := bool_flip(false)'
34- bool_flip (b) = flipped if {
34+ bool_flip (b) : = flipped if {
3535 b
3636 flipped = false
3737}
3838
39- bool_flip (b) = flipped if {
39+ bool_flip (b) : = flipped if {
4040 not b
4141 flipped = true
4242}
@@ -45,17 +45,17 @@ bool_flip(b) = flipped if {
4545# -1: {false, true} or {false}
4646# 0: {}
4747# 1: {true}
48- number (set) = c if {
48+ number (set) : = c if {
4949 count (set) == 0
5050 c := 0
5151}
5252
53- number (set) = c if {
53+ number (set) : = c if {
5454 false in set
5555 c := - 1
5656}
5757
58- number (set) = c if {
58+ number (set) : = c if {
5959 not false in set
6060 set[_]
6161 c := 1
@@ -64,7 +64,7 @@ number(set) = c if {
6464# site, org, and user rules are all similar. Each rule should return a number
6565# from [-1, 1]. The number corresponds to "negative", "abstain", and "positive"
6666# for the given level. See the 'allow' rules for how these numbers are used.
67- default site = 0
67+ default site : = 0
6868
6969site := site_allow (input.subject.roles)
7070
@@ -93,7 +93,7 @@ org_members := {orgID |
9393
9494# org is the same as 'site' except we need to iterate over each organization
9595# that the actor is a member of.
96- default org = 0
96+ default org : = 0
9797
9898org := org_allow (input.subject.roles)
9999
@@ -193,7 +193,7 @@ org_ok if {
193193
194194# User is the same as the site, except it only applies if the user owns the object and
195195# the user is apart of the org (if the object has an org).
196- default user = 0
196+ default user : = 0
197197
198198user := user_allow (input.subject.roles)
199199
0 commit comments