-
Notifications
You must be signed in to change notification settings - Fork 19
fix authorization limit-permission case mismatch #693
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
base: 1.6.x
Are you sure you want to change the base?
fix authorization limit-permission case mismatch #693
Conversation
Dammit, I've just realised my own stupidity. I think I must have tried:
And
Rather than:
READ, CONTROL and ALL are groups (in upper) that get expanded to permissions (in lower). We should probably just validate the config to prevent this mistake being made? |
Well, it's documented as first-letter-capitalized (i.e.
At least with this PR it is essentially case insensitive (aside from the grouped i.e. Also the other good thing about forcing lowercase at this point in the code is you won't miss a negative, i.e |
Thanks for looking into this. I've taken a look and I think this is just a documentation error, looks like it's been lowercase since auth weas introduced in 0.6.0. I think we should probably:
Converting to lowercase is slightly dubious as the same thing can be configured multiple ways (e.g. Also, the docs give camel case, but the UIS uses snake case, so we can't get away without a docs change. |
So you want to make lowercase the documented standard and spit out a validation warning in the UIS logs? (i.e. if
This lowercasing happens after group resolving but before negation, so shouldn't be blurred .. |
closes #692
Before this change a config like this:
Would internally be, with reference to:
cylc-uiserver/cylc/uiserver/authorise.py
Line 305 in 98c9e39
cylc-uiserver/cylc/uiserver/authorise.py
Line 191 in 98c9e39
expanded as:
then via:
gives
read
With this small fix, the permissions are correct:
And UI menu correctly making available the corresponding options:

Check List
CONTRIBUTING.md
and added my name as a Code Contributor.setup.cfg
(andconda-environment.yml
if present).?.?.x
branch.