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

fix: check roles before fetching reports #16260

Merged
merged 1 commit into from
Aug 14, 2021

Conversation

eschutho
Copy link
Member

SUMMARY

This adds an extra role authorization check before fetching reports to fix a bug that was showing an unnecessary error.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Original error:
image (42)

TESTING INSTRUCTIONS

As a gamma user, you should be able to go to a chart or dashboard and not receive errors about not being able to fetch reports.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@eschutho
Copy link
Member Author

@lyndsiWilliams is working on tests for this flow.

@codecov
Copy link

codecov bot commented Aug 14, 2021

Codecov Report

Merging #16260 (d88ef84) into master (24b43be) will decrease coverage by 0.02%.
The diff coverage is 37.50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #16260      +/-   ##
==========================================
- Coverage   76.72%   76.70%   -0.03%     
==========================================
  Files         997      997              
  Lines       53238    53238              
  Branches     6772     6774       +2     
==========================================
- Hits        40847    40834      -13     
- Misses      12161    12174      +13     
  Partials      230      230              
Flag Coverage Δ
javascript 70.95% <37.50%> (-0.06%) ⬇️

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

Impacted Files Coverage Δ
...frontend/src/dashboard/components/Header/index.jsx 59.88% <33.33%> (-3.19%) ⬇️
...tend/src/explore/components/ExploreChartHeader.jsx 49.29% <42.85%> (-6.26%) ⬇️
superset-frontend/src/components/Select/Select.tsx 73.30% <0.00%> (-1.36%) ⬇️

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 24b43be...d88ef84. Read the comment docs.

@eschutho eschutho merged commit 3709131 into apache:master Aug 14, 2021
@eschutho eschutho deleted the elizabeth/viewer-report-role branch August 14, 2021 03:41
stevenuray pushed a commit to preset-io/superset that referenced this pull request Aug 14, 2021
@villebro villebro added the v1.3 label Aug 16, 2021
villebro pushed a commit that referenced this pull request Aug 16, 2021
amitmiran137 pushed a commit that referenced this pull request Aug 16, 2021
…gies

* upstream/master: (64 commits)
  check roles before fetching reports (#16260)
  chore: upgrade mypy and add type guards (#16227)
  fix: pivot columns with ints for name (#16259)
  chore(pylint): Bump Pylint to 2.9.6 (#16146)
  fix examples tab for dashboard (#16253)
  chore: bump superset-ui packages to 0.17.84 (#16251)
  chore: Shows the dataset description in the gallery dropdown (#16200)
  fix(Dashboard): Omnibar dropdown visibility and keyboard commands (#16168)
  chore: bump py version for integration test (#16213)
  fix: skip perms on query context update (#16250)
  refactor: external metadata fetch API (#16193)
  feat(dao): admin can remove self from object owners (#15149)
  fix(dashboard): cross filter chart highlight when filters badge icon clicked (#16233)
  fix: validate_parameters and query (#16241)
  fix: Remove Advanced Analytics tag for 2 charts (#16240)
  Revert "feat: Changing Dataset names (#16199)" (#16235)
  feat: Allow users to connect via legacy SQLA form (#16201)
  fix: remove encryption from db params (#16214)
  fix(Explore): Show the tooltip only when label does not fit the container in METRICS/FILTERS/GROUP BY/SORT BY of the DATA panel (#16060)
  Show/hide tooltips (#16192)
  ...

# Conflicts:
#	superset/tasks/caching/cache_strategy.py
opus-42 pushed a commit to opus-42/incubator-superset that referenced this pull request Nov 14, 2021
cccs-RyanS pushed a commit to CybercentreCanada/superset that referenced this pull request Dec 17, 2021
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 28, 2021
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 29, 2021
cccs-rc pushed a commit to CybercentreCanada/superset that referenced this pull request Mar 6, 2024
@mistercrunch mistercrunch added 🍒 1.3.0 🍒 1.3.1 🍒 1.3.2 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.4.0 labels Mar 13, 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 preset:2021.31 preset-io size/M v1.3 🍒 1.3.0 🍒 1.3.1 🍒 1.3.2 🚢 1.4.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants