-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feature: Playground API * Add tests
- Loading branch information
Showing
42 changed files
with
2,892 additions
and
242 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
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
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
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
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
55 changes: 55 additions & 0 deletions
55
hack/dev/requests/check_resource_batch/resource_batch.json
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,55 @@ | ||
{ | ||
"requestId": "test", | ||
"principal": { | ||
"id": "donald_duck", | ||
"policyVersion": "20210210", | ||
"roles": [ | ||
"employee" | ||
], | ||
"attr": { | ||
"department": "marketing", | ||
"geography": "GB", | ||
"team": "design" | ||
} | ||
}, | ||
"resources": [ | ||
{ | ||
"actions": [ | ||
"view:public", | ||
"approve", | ||
"create" | ||
], | ||
"resource": { | ||
"kind": "leave_request", | ||
"policyVersion": "20210210", | ||
"id": "XX125", | ||
"attr": { | ||
"department": "marketing", | ||
"geography": "GB", | ||
"id": "XX125", | ||
"owner": "john", | ||
"team": "design" | ||
} | ||
} | ||
}, | ||
{ | ||
"actions": [ | ||
"view:public", | ||
"approve", | ||
"create" | ||
], | ||
"resource": { | ||
"kind": "leave_request", | ||
"policyVersion": "20210210", | ||
"id": "XX150", | ||
"attr": { | ||
"department": "marketing", | ||
"geography": "GB", | ||
"id": "XX125", | ||
"owner": "mary", | ||
"team": "design" | ||
} | ||
} | ||
} | ||
] | ||
} |
File renamed without changes.
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,26 @@ | ||
{ | ||
"playgroundId": "test", | ||
"policyFiles": [ | ||
{ | ||
"fileName": "common_roles.yaml", | ||
"contents": "LS0tCmFwaVZlcnNpb246ICJhcGkuY2VyYm9zLmRldi92MSIKZGVzY3JpcHRpb246IHwtCiAgQ29tbW9uIGR5bmFtaWMgcm9sZXMgdXNlZCB3aXRoaW4gdGhlIEFwYXRyIGFwcApkZXJpdmVkX3JvbGVzOgogIG5hbWU6IGFwYXRyX2NvbW1vbl9yb2xlcwogIGRlZmluaXRpb25zOgogICAgLSBuYW1lOiBvd25lcgogICAgICBwYXJlbnRSb2xlczogWyJ1c2VyIl0KICAgICAgY29uZGl0aW9uOgogICAgICAgIG1hdGNoOgogICAgICAgICAgZXhwcjogcmVxdWVzdC5yZXNvdXJjZS5hdHRyLm93bmVyID09IHJlcXVlc3QucHJpbmNpcGFsLmlkCgogICAgLSBuYW1lOiBhYnVzZV9tb2RlcmF0b3IKICAgICAgcGFyZW50Um9sZXM6IFsibW9kZXJhdG9yIl0KICAgICAgY29uZGl0aW9uOgogICAgICAgIG1hdGNoOgogICAgICAgICAgZXhwcjogcmVxdWVzdC5yZXNvdXJjZS5hdHRyLmZsYWdnZWQgPT0gdHJ1ZQo=" | ||
}, | ||
{ | ||
"fileName": "resource.yaml", | ||
"contents": "LS0tCmFwaVZlcnNpb246IGFwaS5jZXJib3MuZGV2L3YxCnJlc291cmNlUG9saWN5OgogIHZlcnNpb246ICJkZWZhdWx0IgogIGltcG9ydERlcml2ZWRSb2xlczoKICAgIC0gYXBhdHJfY29tbW9uX3JvbGVzCiAgcmVzb3VyY2U6ICJhbGJ1bTpvYmplY3QiCiAgcnVsZXM6CiAgICAtIGFjdGlvbnM6IFsnKiddCiAgICAgIGVmZmVjdDogRUZGRUNUX0FMTE9XCiAgICAgIGRlcml2ZWRSb2xlczoKICAgICAgICAtIG93bmVyCgogICAgLSBhY3Rpb25zOiBbJ3ZpZXcnLCAnZmxhZyddCiAgICAgIGVmZmVjdDogRUZGRUNUX0FMTE9XCiAgICAgIHJvbGVzOgogICAgICAgIC0gdXNlcgogICAgICBjb25kaXRpb246CiAgICAgICAgbWF0Y2g6CiAgICAgICAgICBleHByOiByZXF1ZXN0LnJlc291cmNlLmF0dHIucHVibGljID09IHRydWUKCiAgICAtIGFjdGlvbnM6IFsndmlldycsICdkZWxldGUnXQogICAgICBlZmZlY3Q6IEVGRkVDVF9BTExPVwogICAgICBkZXJpdmVkUm9sZXM6CiAgICAgICAgLSBhYnVzZV9tb2RlcmF0b3IK" | ||
} | ||
], | ||
"actions": ["view", "delete"], | ||
"principal": { | ||
"id": "alicia", | ||
"roles": ["user"] | ||
}, | ||
"resource": { | ||
"kind": "album:object", | ||
"id": "XX125", | ||
"attr": { | ||
"owner": "alicia", | ||
"public": false | ||
} | ||
} | ||
} |
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,22 @@ | ||
{ | ||
"playgroundId": "test", | ||
"policyFiles": [ | ||
{ | ||
"fileName": "resource.yaml", | ||
"contents": "LS0tCmFwaVZlcnNpb246IGFwaS5jZXJib3MuZGV2L3YxCnJlc291cmNlUG9saWN5OgogIHZlcnNpb246ICJkZWZhdWx0IgogIGltcG9ydERlcml2ZWRSb2xlczoKICAgIC0gYXBhdHJfY29tbW9uX3JvbGVzCiAgcmVzb3VyY2U6ICJhbGJ1bTpvYmplY3QiCiAgcnVsZXM6CiAgICAtIGFjdGlvbnM6IFsnKiddCiAgICAgIGVmZmVjdDogRUZGRUNUX0FMTE9XCiAgICAgIGRlcml2ZWRSb2xlczoKICAgICAgICAtIG93bmVyCgogICAgLSBhY3Rpb25zOiBbJ3ZpZXcnLCAnZmxhZyddCiAgICAgIGVmZmVjdDogRUZGRUNUX0FMTE9XCiAgICAgIHJvbGVzOgogICAgICAgIC0gdXNlcgogICAgICBjb25kaXRpb246CiAgICAgICAgbWF0Y2g6CiAgICAgICAgICBleHByOiByZXF1ZXN0LnJlc291cmNlLmF0dHIucHVibGljID09IHRydWUKCiAgICAtIGFjdGlvbnM6IFsndmlldycsICdkZWxldGUnXQogICAgICBlZmZlY3Q6IEVGRkVDVF9BTExPVwogICAgICBkZXJpdmVkUm9sZXM6CiAgICAgICAgLSBhYnVzZV9tb2RlcmF0b3IK" | ||
} | ||
], | ||
"actions": ["view", "delete"], | ||
"principal": { | ||
"id": "alicia", | ||
"roles": ["user"] | ||
}, | ||
"resource": { | ||
"kind": "album:object", | ||
"id": "XX125", | ||
"attr": { | ||
"owner": "alicia", | ||
"public": false | ||
} | ||
} | ||
} |
Oops, something went wrong.