Created
March 2, 2022 15:45
-
-
Save tolgaOzen/2b6a3fec5111aad7ceedb5726c7f2967 to your computer and use it in GitHub Desktop.
result policy object
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
{ | |
"name": "task edit policy", | |
"guard_name": "task-edit-policy", | |
"description": "", | |
"options": [ | |
{ | |
"name": "senior manager", | |
"guard_name": "senior-manager", | |
"rules": [ | |
{ | |
"name": "is senior", | |
"guard_name": "is-senior", | |
"description": "", | |
"conditions": [ | |
"user.attributes.tenure > 8" | |
] | |
}, | |
{ | |
"name": "is manager", | |
"guard_name": "is-manager", | |
"description": "", | |
"conditions": [ | |
"\"manager\" in user.roles" | |
] | |
} | |
] | |
}, | |
{ | |
"name": "resource owner", | |
"guard_name": "resource owner", | |
"rules": [ | |
{ | |
"name": "is resource owner", | |
"guard_name": "is-resource-owner", | |
"description": "", | |
"conditions": [ | |
"user.id == resource.attributes.owner_id" | |
] | |
} | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment