-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add endpoints for effective permissions #88
Comments
An alternative solution. There will be a single endpoint: Effective role JSON example: {
"explicitPermissions": {
"entities": [
{
"target": "sample_Author:create",
"value": 1
},
{
"target": "sample_Author:read",
"value": 1
},
{
"target": "sample_Book:create",
"value": 0
}
],
"entityAtributes": [
{
"target": "sample_Author:name",
"value": 2
},
{
"target": "sample_Author:email",
"value": 1
}
],
"specific": [
{
"target": "cuba.restApi.enabled",
"value": 1
},
{
"target": "some.other.permission",
"value": 0
}
]
},
"defaultValues": {
"entityCreate": 0,
"entityRead": 1,
"entityUpdate": 1,
"entityDelete": 1,
"entityAttribute": 2,
"specific": 0
},
"undefinedPermissionPolicy": "ALLOW"
} The If the default for the operation is not defined, then take the value from the The
E.g. |
Defaults for permission type have been removed. Wildcard permissions are returned instead.
The JSON result have been modified. The default values section is not returned any more. Wildcard permissions are returned instead. Example:
For entity permissions the following wildcard targets are supported:
For attribute permissions a wildcard may be defined for a particular entity or for all entities:
After these changes, an algorithm to evaluate a permission should be the following (example is for attribute permission
For entity operation the algorithm will be (example for Author read operation):
For specific permission the only possible wildcard is |
Defaults for permission type have been removed. Wildcard permissions are returned instead.
The
/rest/v2/permissions/entities
endpoint should return effective permissions for all entities operations:The
/rest/v2/permissions/entityAttributes
endpoint should return effective permissions for all entity attributes:The text was updated successfully, but these errors were encountered: