duynguyenhoang opened a new issue #15391:
URL: https://github.com/apache/superset/issues/15391


   There is in consistence Permissions UI between Dashboard and Explore. This 
issue is the next attempt after https://github.com/apache/superset/issues/13711 
   
   ### Expected results
   
   * If user don't have can_favstar permission
    
       * Dashboard: Disable fav icon
       * Explore page: Disable fav icon
   
   * If user don't have: can_shortner and can_share_chart
      - Dashboard: Don't show "Copy chart URL", "Share chart by Email"
      - Explore page: Disable "Copy chart URL", "Share chart by Email" and 
"Embedded Code"
   * If user don't have: can_sqllab
      - Explore page: Remove "Run in SQL lab"
   
   * If user don't have: can_write and not the owner
      - Explore page: Hide "Edit property" menu
      - Explore page: Disable "Save" button
   
   ### Actual results
   
   These icons/menus are shown but when we click, error returns because of 
permission
   
   #### Screenshots
   
   If applicable, add screenshots to help explain your problem.
   
   #### How to reproduce the bug
   
   1. Create a new user
   2. Create new roles, each permission is a new role
      - can_favstar
      - can shortner
      - can_share_chart 
      - can_sqllab
      - can_write Chart
      - can_explore (To go to explore page)
      - Allow to read dashboard/slice
   3. Assign: explore and read dashboard only to user
   4. You still can see
      - fave star icon on Dashboard page, but when you click it there is an 
error appear
      - fave star icon on Explore page, but when you click it there is an error 
appear
      - Share/Embed/Email icons show, but there is error when it is clicked.
      - Edit Properties menu show, but user cannot change it
      - SQL Lab menu appears, but user cannot go to that page.
   
   ### Environment
   
   - superset version: master
   - python version: 3.7
   - node.js version: v14.15.5
   
   ### Checklist
   
   Make sure to follow these steps before submitting your issue - thank you!
   
   - [x] I have checked the superset logs for python stacktraces and included 
it here as text if there are any.
   - [x] I have reproduced the issue with at least the latest released version 
of superset.
   - [x] I have checked the issue tracker for the same issue and I haven't 
found one similar.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to