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] New, deprecate merge_perm, FAB method is fixed #7355

Merged
merged 6 commits into from
May 21, 2019

Conversation

dpgaspar
Copy link
Member

@dpgaspar dpgaspar commented Apr 23, 2019

CATEGORY

  • Refactor

SUMMARY

Since FAB version 2.0.0 that safe guards made on merge_perms on Superset were included on FAB.
This makes it possible to simplify Superset's custom SecurityManager. And remove merge_perms.

Note: Only after PR #7323

ADDITIONAL INFORMATION

REVIEWERS

@dpgaspar dpgaspar changed the title [security] New, deprecate merge_perm, FAB method is fixed [WiP] [security] New, deprecate merge_perm, FAB method is fixed Apr 23, 2019
@codecov-io
Copy link

codecov-io commented Apr 23, 2019

Codecov Report

Merging #7355 into master will increase coverage by 0.28%.
The diff coverage is 35.29%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7355      +/-   ##
==========================================
+ Coverage   64.89%   65.18%   +0.28%     
==========================================
  Files         428      433       +5     
  Lines       20937    21428     +491     
  Branches     2330     2360      +30     
==========================================
+ Hits        13588    13968     +380     
- Misses       7225     7340     +115     
+ Partials      124      120       -4
Impacted Files Coverage Δ
superset/cli.py 36.01% <ø> (+0.95%) ⬆️
superset/connectors/sqla/views.py 63.15% <0%> (ø) ⬆️
superset/connectors/druid/views.py 66.21% <0%> (ø) ⬆️
superset/views/core.py 72.92% <100%> (+0.02%) ⬆️
superset/security.py 74.77% <66.66%> (-1.42%) ⬇️
superset/views/sql_lab.py 86.95% <0%> (-7.69%) ⬇️
superset/assets/src/SqlLab/reducers/sqlLab.js 50% <0%> (-6.61%) ⬇️
superset/assets/src/SqlLab/actions/sqlLab.js 64.73% <0%> (-5.92%) ⬇️
...uperset/assets/src/SqlLab/components/SqlEditor.jsx 54.7% <0%> (-5.3%) ⬇️
superset/assets/src/chart/Chart.jsx 10.86% <0%> (-1.64%) ⬇️
... and 56 more

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 845218d...c6bdeb6. Read the comment docs.

@dpgaspar dpgaspar changed the title [WiP] [security] New, deprecate merge_perm, FAB method is fixed [security] New, deprecate merge_perm, FAB method is fixed Apr 23, 2019
Copy link
Member

@mistercrunch mistercrunch left a comment

Choose a reason for hiding this comment

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

Will merge after the FAB 2.0 PR is merged

Copy link
Member

@mistercrunch mistercrunch left a comment

Choose a reason for hiding this comment

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

Minor comment, otherwise LGTM.

The SupersetSecurityManager API is fairly public given that in most settings people are expected to create their own security manager. Let's make sure upgrading is easy.

@@ -262,27 +262,17 @@ def accessible_by_user(self, database, datasource_names, schema=None):
full_names = {d.full_name for d in user_datasources}
return [d for d in datasource_names if d in full_names]

def merge_perm(self, permission_name, view_menu_name):
Copy link
Member

Choose a reason for hiding this comment

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

For backwards compatibility, we should just call self.add_permission_view_menu here and maybe add a deprecation warning.

@mistercrunch mistercrunch merged commit 74704f6 into apache:master May 21, 2019
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.34.0 labels Feb 28, 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 size/M 🚢 0.34.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants