-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rego-v1: Future-proofing
download
pkg tests to be 1.0 compatible (#…
…7035) Signed-off-by: Johan Fylling <[email protected]>
- Loading branch information
1 parent
acb3272
commit e9def27
Showing
11 changed files
with
102 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"revision":"","roots":["peoplefinder"]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
23 changes: 23 additions & 0 deletions
23
download/testdata/latest_bundle_data/src/policies/__id/delete.rego
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package peoplefinder.DELETE.api.users.__id | ||
|
||
import rego.v1 | ||
import input.user.attributes.properties as user_props | ||
|
||
default allowed = false | ||
|
||
default visible = false | ||
|
||
default enabled = false | ||
|
||
allowed if { | ||
user_props.department == "Operations" | ||
user_props.title == "IT Manager" | ||
} | ||
|
||
visible if { | ||
user_props.department == "Operations" | ||
} | ||
|
||
enabled if { | ||
allowed | ||
} |
7 changes: 7 additions & 0 deletions
7
download/testdata/latest_bundle_data/src/policies/__id/get.rego
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package peoplefinder.GET.api.users.__id | ||
|
||
default allowed = true | ||
|
||
default visible = true | ||
|
||
default enabled = true |
18 changes: 18 additions & 0 deletions
18
download/testdata/latest_bundle_data/src/policies/__id/post.rego
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package peoplefinder.POST.api.users.__id | ||
|
||
import rego.v1 | ||
import input.user.attributes.properties as user_props | ||
|
||
default allowed = false | ||
|
||
default visible = true | ||
|
||
default enabled = false | ||
|
||
allowed if { | ||
user_props.department == "Operations" | ||
} | ||
|
||
enabled if { | ||
allowed | ||
} |
18 changes: 18 additions & 0 deletions
18
download/testdata/latest_bundle_data/src/policies/__id/put.rego
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package peoplefinder.PUT.api.users.__id | ||
|
||
import rego.v1 | ||
import input.user.attributes.properties as user_props | ||
|
||
default allowed = false | ||
|
||
default visible = true | ||
|
||
default enabled = true | ||
|
||
allowed if { | ||
user_props.department == "Operations" | ||
} | ||
|
||
allowed if { | ||
input.user.id == input.resource.id | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package peoplefinder.GET.api.users | ||
|
||
default allowed = true | ||
|
||
default visible = true | ||
|
||
default enabled = true |
23 changes: 23 additions & 0 deletions
23
download/testdata/latest_bundle_data/src/policies/post.rego
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package peoplefinder.POST.api.users | ||
|
||
import rego.v1 | ||
import input.user.attributes.properties as user_props | ||
|
||
default allowed = false | ||
|
||
default visible = false | ||
|
||
default enabled = false | ||
|
||
allowed if { | ||
user_props.department == "Operations" | ||
user_props.title == "IT Manager" | ||
} | ||
|
||
visible if { | ||
allowed | ||
} | ||
|
||
enabled if { | ||
allowed | ||
} |