-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
Don't add User role perms to custom roles. #13856
Conversation
That was quick :) -- Can you please add PR description describing the change and reference the Github issue it solves? |
@kaxil My b, I thought I had added it. Updated! |
cc @davido912 |
Thanks James, will take a deeper look over the weekend or Monday This might fix #13511 too |
I can confirm this does indeed fix the issue where a role would be populated with the USER permissions. I opened another issue that still remains. I've yet to find a fix for this but thanks for looking into this! |
Thanks @jhtimmins for the PR and @davido912 for testing it :) |
I have started seeing this warnings @jhtimmins -- after merging this to Master and running Airflow locally with it:
|
Solves the problem of roles getting incorrectly populated with all permissions of the User class. Now they are auto-populated with Website.can_read and nothing else.
Expected Behavior
When a custom role is created, the role should not include any extra permissions beyond what the user added.
Actual Behavior
All permissions for the default User role are copied into each custom rule.
Update Behavior
Rather than adding all permissions from the User role, the only permission added now is
Website.can_read
. This is required to allow access to the homepage.closes: #9245
related: #9245