bito-code-review[bot] commented on code in PR #42404:
URL: https://github.com/apache/superset/pull/42404#discussion_r3885227335


##########
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:
   <div>
   
   
   <div id="suggestion">
   <div id="issue"><b>Missing extra_editors check</b></div>
   <div id="fix">
   
   The list-row editorship check omits `extra_editors`, so editors granted via 
`EXTRA_EDITORS_RESOLVER` see a read-only 'View' action even though the server 
permits editing. `ThemeModal` already passes `resource?.extra_editors` 
(ThemeModal.tsx:195-200) and the server attaches it per row (`pre_get_list`). 
Pass `original.extra_editors` to `isUserEditorOrAdmin` for consistency.
   </div>
   
   
   </div>
   
   
   
   
   <small><i>Code Review Run #d57422</i></small>
   </div>
   
   ---
   Should Bito avoid suggestions like this for future reviews? (<a 
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
   - [ ] Yes, avoid them



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