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

Communicate why an upload action was not allowed #395

Open
jameshadfield opened this issue Aug 29, 2024 · 1 comment
Open

Communicate why an upload action was not allowed #395

jameshadfield opened this issue Aug 29, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@jameshadfield
Copy link
Member

Attempting to upload a dataset without the required permissions looks like:

$ nextstrain remote upload ... 
Error: Permission denied

Are you logged in as the correct user? Current user: XXX

It would be helpful to differentiate between two causative scenarios here: user is not part of this group vs user is a viewer of the group and thus can't modify data. I did a bit of searching to see if RBAC recommends against this kind of communication about roles but I couldn't find anything. Specifically, I'm thinking of seeing how feasible it is to change the above error message to something like:

Are you logged in as the correct user?
Current user: XXX is not a member of the group YYY
Are you logged in as the correct user?
Current user: XXX is a "viewer" of the group YYY however
uploading requires "editor" access.
@jameshadfield jameshadfield added the enhancement New feature or request label Aug 29, 2024
@tsibley
Copy link
Member

tsibley commented Aug 29, 2024

This would be done mostly as an enhancement on the server for a) our authz evaluators to start returning reasons, not just boolean status and b) to include those reasons in the error returned to the client (e.g. Nextstrain CLI). We'd then make sure Nextstrain CLI passed along the reasons to the user in a useful way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants