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

[security] allow security manager provide error message #5500

Conversation

timifasubaa
Copy link
Contributor

@timifasubaa timifasubaa commented Jul 26, 2018

This PR

  1. Makes the superset access request flow optional again.
  2. Allows the security manager provide the error message for access request denials.

@john-bodley @michellethomas @mistercrunch

@timifasubaa timifasubaa force-pushed the allow_security_manager_provide_error_message branch 6 times, most recently from e4375f2 to f87585d Compare July 27, 2018 18:13
@timifasubaa timifasubaa force-pushed the allow_security_manager_provide_error_message branch from f87585d to a0c4858 Compare July 27, 2018 18:40
@timifasubaa timifasubaa changed the title [WIP] allow security manager provide error message [security] allow security manager provide error message Jul 27, 2018
@codecov-io
Copy link

Codecov Report

Merging #5500 into master will decrease coverage by 0.07%.
The diff coverage is 30.76%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5500      +/-   ##
==========================================
- Coverage   63.37%   63.29%   -0.08%     
==========================================
  Files         349      349              
  Lines       22110    22114       +4     
  Branches     2455     2455              
==========================================
- Hits        14013    13998      -15     
- Misses       8083     8102      +19     
  Partials       14       14
Impacted Files Coverage Δ
superset/views/core.py 74.17% <16.66%> (-1.16%) ⬇️
superset/security.py 73.09% <42.85%> (-1.12%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d373178...a0c4858. Read the comment docs.

Copy link
Member

@john-bodley john-bodley left a comment

Choose a reason for hiding this comment

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

Overall LGTM. I agree with the idea of moving this logic to the security manager. I just had one question regarding one of the checks.

@@ -1260,9 +1255,11 @@ def explore(self, datasource_type=None, datasource_id=None):
flash(DATASOURCE_MISSING_ERR, 'danger')
return redirect(error_redirect)

if not security_manager.datasource_access(datasource):
if config.get('ENABLE_ACCESS_REQUEST') and (
Copy link
Member

Choose a reason for hiding this comment

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

Why was this check added?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

A check is done at a lower point (in explore_json) This check here is strictly for redirecting users who don't have access to the access request page.

@timifasubaa timifasubaa merged commit 3b6cafc into apache:master Jul 27, 2018
timifasubaa added a commit to airbnb/superset-fork that referenced this pull request Aug 2, 2018
wenchma pushed a commit to wenchma/incubator-superset that referenced this pull request Nov 16, 2018
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.28.0 labels Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.28.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants