Vitor-Avila opened a new pull request, #33553:
URL: https://github.com/apache/superset/pull/33553

   ### SUMMARY
   The All Entities view (`/superset/all_entities/?id=${TAG_ID}`) was always 
displaying action buttons (**Edit tag** and **Add tag to entities**), 
regardless if the user had permission to perform these actions or not. This PR 
makes the visibility of these buttons dynamic.
   
   It also updates the list to only display the Dashboards / Charts / Queries 
list in case they have any item. 
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   Before, the list would include all asset types, even if there are no 
elements:
   
   <img width="1789" alt="image" 
src="https://github.com/user-attachments/assets/0d008152-ad0c-449b-b396-748ed1309346";
 />
   
   Now, the list only includes the asset type that has items:
   <img width="1791" alt="image" 
src="https://github.com/user-attachments/assets/a3613d98-9bd5-4859-9de9-7bd40d3eda15";
 />
   
   Also changed the button casing from **Edit Tag** to **Edit tag**.
   
   Video demonstrating the other buttons:
   
   
https://github.com/user-attachments/assets/4ae4edf9-cc4a-4bc5-b102-bf929c827150
   
   ### TESTING INSTRUCTIONS
   Added frontend tests. For manual testing:
   
   1. Access Superset with an admin account.
   2. Create a chart.
   3. Create two tags.
   4. Add one of these tags to the chart.
   5. Access Superset with an account that does not have the `can_write` perm 
on `Tag`.
   6. Access the Charts menu, and click on the Tag name in the list.
   7. Confirm you don't see the **Edit tag** button.
   8. Update the tag ID in the URL to the other tag that is not associated with 
any items.
   9. Confirm you don't see the **Add tag to entities** button.
   
   ### 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:
   - [ ] 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