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

"Set up email report" only if the user's first role has "menu_access on Manage" permission #21559

Closed
2 of 3 tasks
zhaorui2022 opened this issue Sep 22, 2022 · 0 comments
Closed
2 of 3 tasks
Labels

Comments

@zhaorui2022
Copy link
Contributor

If a user is not Admin, but is granted "menu_access on Manage" permission through other roles, the user won't be able to see "Set up email report" button in the drop down menu on Dashboards or charts unless the first role has "menu_access on Manage" permission. This is because on line 123 of this file https://github.com/apache/superset/blob/master/superset-frontend/src/components/ReportModal/HeaderReportDropdown/index.tsx#L118-L123 , it only checks the first role.

How to reproduce the bug

  1. Find a user whose first role doesn't have "menu_access on Manager" permission but is granted through other roles
  2. Click on either a dashboard or a chart
  3. Click on the three dots button
  4. "Set up email report" button doesn't show up

Expected results

If a user has been granted the correct permission, the user should be able to see the "Set up email report" button

Actual results

the "Set up email report" button doesn't show up

Screenshots

N/A

Environment

(please complete the following information):

  • browser type and version: tried on all browsers
  • superset version: superset 2.0.0
  • python version: 3.8
  • node.js version: N/A
  • any feature flags active: ALERT_REPORT is enabled

Checklist

Make sure to follow these steps before submitting your issue - thank you!

  • I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • I have reproduced the issue with at least the latest released version of superset.
  • I have checked the issue tracker for the same issue and I haven't found one similar.

Additional context

Will send a PR later to fix the issue

@zhaorui2022 zhaorui2022 added the #bug Bug report label Sep 22, 2022
eschutho pushed a commit to preset-io/superset that referenced this issue Oct 18, 2022
…ashboards. Fixes apache#21559 (apache#21561)

Co-authored-by: Rui Zhao <zhaorui@dropbox.com>
(cherry picked from commit 7f971b4)
Fahrenheit35 pushed a commit to Fahrenheit35/superset that referenced this issue Nov 11, 2022
…ashboards. Fixes apache#21559 (apache#21561)

Co-authored-by: Rui Zhao <zhaorui@dropbox.com>
(cherry picked from commit 7f971b4)
Fahrenheit35 pushed a commit to Fahrenheit35/superset that referenced this issue Jul 11, 2023
…ashboards. Fixes apache#21559 (apache#21561)

Co-authored-by: Rui Zhao <zhaorui@dropbox.com>
(cherry picked from commit 7f971b4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants