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

Add "no-op" action and use it as default for scope permissions #1138

Merged
merged 7 commits into from
Apr 23, 2021
Merged

Conversation

jefferai
Copy link
Member

@jefferai jefferai commented Apr 15, 2021

Because of listing visibility, if no actions are assigned to a user for
an individual resource, it's excluded from the list. This is fine and
good. However, when we made a change in 0.2.0 to restrict the
information returned from listing for the anonymous user for scopes and
auth methods, it exposed the fact that because of the way this
visibility works we had to add read to scopes by default -- thereby
rather defeating the purpose of restricting what goes back to u_anon
requests.

The purpose of "no-op" is to never be used for real actions within the
API, but as something that can be granted to specifically enable
visibility for the targeted user. This makes the controls over list
visibility much more granular.

Why is it called "no-op" instead of e.g. "visible"? Both because grants
provide actions, not nouns, and because if it's something that conveys
real capability people might assume it can be used to do something
real :-)

Because of listing visibility, if no actions are assigned to a user for
an individual resource, it's excluded from the list. This is fine and
good. However, when we made a change in 0.2.0 to restrict the
information returned from listing for the anonymous user for scopes and
auth methods, it exposed the fact that because of the way this
visibility works we had to add `read` to scopes by default -- thereby
rather defeating the purpose of restricting what goes back to `u_anon`
requests.

The purpose of "no-op" is to never be used for real actions within the
API, but as something that can be granted to specifically enable
visibility for the targeted user. This makes the controls over list
visibility much more granular.
@jefferai jefferai added this to the 0.2.1 milestone Apr 16, 2021
Copy link
Collaborator

@louisruch louisruch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great, it did feel strange needing read access to list this resolve this perfectly!

@jefferai jefferai requested review from jimlambrt and removed request for talanknight April 21, 2021 19:19
@jefferai jefferai merged commit 727d1c7 into main Apr 23, 2021
@jefferai jefferai deleted the ICU-1315 branch April 23, 2021 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants