-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
rfc: improvements to permissions in v3 #10116
base: master
Are you sure you want to change the base?
Conversation
2. Provide merge semantics: | ||
|
||
In the metadata, instead of composing a fixed set of permissions using | ||
inherited roles, we could for example, allow specifying the permission | ||
capabilities. For example, | ||
|
||
```yaml | ||
conflict_rules: | ||
# admin insert permissions should be preferred over user role's insert | ||
# permissions on all tables | ||
- admin.insert > user.insert | ||
|
||
# manager's update permissions should be preferred over user role's select | ||
# update permissions on employee_details table | ||
- manager.update.employee_details > user.update.employee_details |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this shouldn't be part of the metadata (otherwise we will run into the problems we had with inherited roles in V2) and rather it should be part of the GraphQL request, akin to SQL's on_conflict
.
I am not sure how this information can be provided on a per-request basis, but one idea I can think of which may work is to accept a header that accepts a JSON object with the above mentioned rules.
Rendered