Skip to content
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

Change immutable and generated annotation behavior #921

Open
RFSH opened this issue Oct 29, 2021 · 0 comments
Open

Change immutable and generated annotation behavior #921

RFSH opened this issue Oct 29, 2021 · 0 comments
Labels
annotation Anything related the annotations (adding new one or changing existing one) discussion required requires a discussion before moving forward

Comments

@RFSH
Copy link
Member

RFSH commented Oct 29, 2021

The current implementation assumes that generated also implies immutable , but not non-deletable  (and older version did assume non-deletable). In this issue we want to consider changing this behavior, so the two annotations work independently.

This combination is not used in Facebase, but in RBK the way the annotation is written seems to assume that generated implies immutable and non-deletable.

This was a blocker in CFDE since we want to disable "create" through chaise but allow "edit". Hence we decided to add a special false value for all the ACL annotations. false means that the inheritance should be ignored and the value should be used without needing to consult with other annotations. For instance if immutable=false is defined on a table, we shouldn't look for schema's ACLs annotation or the generated annotation on the table.

I should mention that the ACL annotations don't "grant" permission. They are mainly used to "take away" a permission, and the special false value is just to block the interpretation of inherited annotations. So even if you set immutable=false on a table, we will consult with the real model rights to figure out if the client has the proper privileges or not.

@RFSH RFSH added enhancement annotation Anything related the annotations (adding new one or changing existing one) and removed enhancement labels Apr 5, 2022
@jrchudy jrchudy added the discussion required requires a discussion before moving forward label Apr 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
annotation Anything related the annotations (adding new one or changing existing one) discussion required requires a discussion before moving forward
Projects
None yet
Development

No branches or pull requests

2 participants