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

feat(databases): security perm simplification #12036

Merged
merged 4 commits into from
Dec 17, 2020

Conversation

dpgaspar
Copy link
Member

@dpgaspar dpgaspar commented Dec 14, 2020

SUMMARY

security permission simplification. Scope Databases for API and MVC FAB classes.

Existing permissions:

Permission View
can_add DatabaseView
can_delete DatabaseView
can_edit DatabaseView
can_list DatabaseView
can_mulexport DatabaseView
can_post DatabaseView
can_show DatabaseView
muldelete DatabaseView
yaml_export DatabaseView

Future permissions:

Permission View
can_read Database
can_write Database

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI
  • Requires DB Migration.
  • Confirm DB Migration upgrade and downgrade tested.
  • Introduces new feature or API
  • Removes existing feature or API

@dpgaspar dpgaspar added the risk:db-migration PRs that require a DB migration label Dec 14, 2020
@codecov-io
Copy link

codecov-io commented Dec 14, 2020

Codecov Report

Merging #12036 (cde568c) into master (dd5cdb1) will decrease coverage by 1.13%.
The diff coverage is 24.39%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #12036      +/-   ##
==========================================
- Coverage   64.71%   63.57%   -1.14%     
==========================================
  Files         960      961       +1     
  Lines       47302    47324      +22     
  Branches     4629     4629              
==========================================
- Hits        30611    30087     -524     
- Misses      16517    17053     +536     
- Partials      174      184      +10     
Flag Coverage Δ
cypress ?
javascript 62.72% <100.00%> (+0.01%) ⬆️
python 64.09% <16.21%> (-0.10%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
superset/constants.py 100.00% <ø> (ø)
...rsions/42b4c9e01447_security_converge_databases.py 0.00% <0.00%> (ø)
...tend/src/views/CRUD/data/database/DatabaseList.tsx 79.20% <100.00%> (+2.97%) ⬆️
superset/databases/api.py 89.15% <100.00%> (+0.04%) ⬆️
superset/views/database/views.py 87.56% <100.00%> (+0.13%) ⬆️
superset-frontend/src/explore/App.jsx 0.00% <0.00%> (-100.00%) ⬇️
superset-frontend/src/setup/setupColors.js 0.00% <0.00%> (-100.00%) ⬇️
superset-frontend/src/chart/ChartContainer.jsx 0.00% <0.00%> (-100.00%) ⬇️
superset-frontend/src/explore/reducers/index.js 0.00% <0.00%> (-100.00%) ⬇️
...-frontend/src/visualizations/presets/MainPreset.js 0.00% <0.00%> (-100.00%) ⬇️
... and 79 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 dd5cdb1...cde568c. Read the comment docs.

@dpgaspar dpgaspar marked this pull request as ready for review December 14, 2020 16:36
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.

NIT: do we have a note in UPDATING.md? I'm guessing all the perm simplification could point to a central doc explaining what we're up to here

@dpgaspar
Copy link
Member Author

NIT: do we have a note in UPDATING.md? I'm guessing all the perm simplification could point to a central doc explaining what we're up to here

yes good point, do you think that one line per PR on the UPDATING.md is too much?

# Conflicts:
#	superset/constants.py
#	tests/security_tests.py
@dpgaspar dpgaspar merged commit 790ac5e into apache:master Dec 17, 2020
@dpgaspar dpgaspar deleted the feat/security-converge-databases branch December 17, 2020 12:37
amitmiran137 pushed a commit to simcha90/incubator-superset that referenced this pull request Dec 18, 2020
* upstream/master: (55 commits)
  feat(explore): time picker enhancement (apache#11418)
  feat: update alert/report icons and column order (apache#12081)
  feat(explore): metrics and filters controls redesign (apache#12095)
  feat(alerts/reports): add refresh action (apache#12071)
  chore: add latest tag action (apache#11148)
  fix(reports): increase crontab size and alert fixes (apache#12056)
  Small typo fix in Athena connection docs (apache#12099)
  feat(queries): security perm simplification (apache#12072)
  feat(databases): security perm simplification (apache#12036)
  feat(dashboards): security permissions simplification (apache#12012)
  feat(logs): security permissions simplification (apache#12061)
  chore: Remove unused CodeModal (apache#11972)
  Fix typescript error (apache#12074)
  fix: handle context-dependent feature flags in CLI (apache#12088)
  fix: Fix "View in SQLLab" bug (apache#12086)
  feat(alert/report): add 'not null' condition option to modal (apache#12077)
  bumping superset ui to 15.18 and deckgl to 0.3.2 (apache#12078)
  fix: Python dependencies in apache#11499 (apache#12079)
  reset active tab on open (apache#12048)
  fix: improve import flow UI/UX (apache#12070)
  ...
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.0.0 labels Mar 12, 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 risk:db-migration PRs that require a DB migration size/L 🚢 1.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants