bito-code-review[bot] commented on code in PR #42404:
URL: https://github.com/apache/superset/pull/42404#discussion_r3906030756
##########
superset-frontend/src/pages/ThemeList/index.tsx:
##########
@@ -466,13 +484,19 @@ function ThemesList({
const handleApply = () => handleThemeApply(original);
const handleExport = () => handleBulkThemeExport([original]);
+ // A user may edit a non-system theme only if they are an editor
+ // (or an admin). Everyone else gets a read-only view.
+ const allowEdit =
+ !original.is_system &&
+ isUserEditorOrAdmin(currentUser, original.editors);
Review Comment:
<!-- Bito Reply -->
The suggestion provided by the reviewer was appropriate and correctly
addressed the missing check for extra editors. Applying this change ensures
consistency between the list view and the modal, and the addition of test
coverage confirms the fix is functioning as expected.
**superset-frontend/src/pages/ThemeList/index.tsx**
```
// A user may edit a non-system theme only if they are an editor
// (or an admin). Everyone else gets a read-only view.
const allowEdit =
!original.is_system &&
isUserEditorOrAdmin(currentUser, original.editors);
```
--
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]