cezudas opened a new pull request, #31359:
URL: https://github.com/apache/superset/pull/31359

   
   <!---
   Please write the PR title following the conventions at 
https://www.conventionalcommits.org/en/v1.0.0/
   Example:
   fix(dashboard): load charts correctly
   -->
   
   ### SUMMARY
   <!--- Describe the change below, including rationale and design decisions -->
   While in embedded mode, one could argue that sharing should be disabled 
since the links do not work in embed mode and clicking them will redirect a  
`GUEST_USER` to the `standalone` version of superset and will hit a "login 
wall". 
   Such a share link is 
http://localhost:8088/superset/dashboard/p/4aRGDe0MLmo/. See the screenshot 
below.
   
   In my experience it is enough to:
   - ensure the role used as `GUEST_ROLE_NAME` lacks the following permissions
   ```
   {
       "permission": { "name": "can_export" },
       "view_menu": { "name": "Dashboard" }
   },
   {
       "permission": { "name": "can_export" },
       "view_menu": { "name": "Chart" }
   }
   
   ```
   - conditionally render the share links for Tab title and Chart title based 
on the permissions listed above
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   Before:
   Clickable links
   <img width="669" alt="Screenshot 2024-12-09 at 22 31 02" 
src="https://github.com/user-attachments/assets/0878191b-bdc6-43f2-9820-f1a07c0ec582";>
   
   <img width="813" alt="Screenshot 2024-12-09 at 22 31 09" 
src="https://github.com/user-attachments/assets/3aad80ee-8ca3-4a90-9cea-27844d06a2b7";>
   
   ### TESTING INSTRUCTIONS
   <!--- Required! What steps can be taken to manually verify the changes? -->
   I used a user WITHOUT the following permissions
   ```
   {
       "permission": { "name": "can_export" },
       "view_menu": { "name": "Dashboard" }
   },
   {
       "permission": { "name": "can_export" },
       "view_menu": { "name": "Chart" }
   }
   
   ```
   
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [x] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] 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
   


-- 
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