-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
fix: change public role like gamma procedure #10674
fix: change public role like gamma procedure #10674
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🎉 One small convenience suggestion, although I'm not sure if we should be cluttering the codebase with these deprecation warnings, as UPDATING.md
should be read by everyone anyway before updating.
superset/security/manager.py
Outdated
if conf.get("PUBLIC_ROLE_LIKE_GAMMA", False): | ||
self.set_role("Public", self._is_gamma_pvm) | ||
if conf["PUBLIC_ROLE_LIKE"]: | ||
self.copy_role(conf["PUBLIC_ROLE_LIKE"], self.auth_role_public, merge=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be super accomodating, we could do something like
if conf.get("PUBLIC_ROLE_LIKE_GAMMA", False):
logger.warning("The config `PUBLIC_ROLE_LIKE_GAMMA` is deprecated and will be removed in Superset 1.0. Please use `PUBLIC_ROLE_LIKE ` instead.")
self.copy_role("Gamma", self.auth_role_public, merge=True)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea
Codecov Report
@@ Coverage Diff @@
## master #10674 +/- ##
==========================================
- Coverage 64.36% 64.30% -0.07%
==========================================
Files 785 785
Lines 36981 37016 +35
Branches 3530 3530
==========================================
Hits 23803 23803
- Misses 13070 13101 +31
- Partials 108 112 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
… fix/public-role-like-gamma
Added a very simple landing page for the public/anonymous users, since rendering the login page is not correct if the |
* fix: change public role like gamma procedure * lint and updating UPDATING with breaking change * fix updating text * add test and support PUBLIC_ROLE_LIKE_GAMMA * fix, cleanup tests * fix, new test * fix, public default * Update superset/config.py Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com> * add simple public welcome page Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
* fix: change public role like gamma procedure * lint and updating UPDATING with breaking change * fix updating text * add test and support PUBLIC_ROLE_LIKE_GAMMA * fix, cleanup tests * fix, new test * fix, public default * Update superset/config.py Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com> * add simple public welcome page Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
* fix: change public role like gamma procedure * lint and updating UPDATING with breaking change * fix updating text * add test and support PUBLIC_ROLE_LIKE_GAMMA * fix, cleanup tests * fix, new test * fix, public default * Update superset/config.py Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com> * add simple public welcome page Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
* fix: change public role like gamma procedure * lint and updating UPDATING with breaking change * fix updating text * add test and support PUBLIC_ROLE_LIKE_GAMMA * fix, cleanup tests * fix, new test * fix, public default * Update superset/config.py Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com> * add simple public welcome page Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
* fix: change public role like gamma procedure * lint and updating UPDATING with breaking change * fix updating text * add test and support PUBLIC_ROLE_LIKE_GAMMA * fix, cleanup tests * fix, new test * fix, public default * Update superset/config.py Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com> * add simple public welcome page Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
SUMMARY
Fixes #9807, by merging the
Public
role definition with pre-existing data access permissions (all other permissions not included on the template role are removed).This PR also makes the definition of the
Public
role more configurable, for thisPUBLIC_ROLE_LIKE_GAMMA
is removed (breaking change) and a new key is introducedPUBLIC_ROLE_LIKE
where a specific role can be set, likeAdmin
,Alpha
,Gamma
or any other role preexisting on the DB or configured has a builtin role on the config itself.To retain the same behaviour configure it the following way:
ADDITIONAL INFORMATION