rfc: improvements to permissions in v3#10116
Open
0x777 wants to merge 4 commits into
Open
Conversation
Comment on lines
+120
to
+134
| 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 |
Contributor
There was a problem hiding this comment.
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.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rendered