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


##########
superset-frontend/src/pages/DatasetList/index.tsx:
##########
@@ -880,27 +853,19 @@ const DatasetList: FunctionComponent<DatasetListProps> = 
({
                     title={t('Edit')}
                     placement="bottom"
                   >
-                    <span
+                    <IconButton
                       data-test="dataset-row-edit"
-                      role="button"
-                      tabIndex={0}
-                      className="action-button"
                       onClick={() => setSvCurrentlyEditing(original)}
-                    >
-                      <Icons.EditOutlined iconSize="l" />
-                    </span>
+                      icon={<Icons.EditOutlined iconSize="l" />}
+                    />
                   </Tooltip>
                 )}

Review Comment:
   <div>
   
   
   <div id="suggestion">
   <div id="issue"><b>Semantic view delete bypasses editor check</b></div>
   <div id="fix">
   
   The semantic-view action branch (lines 833-862) gates edit/delete on the 
coarse `canEdit`/`canDelete` flags derived from the `can_write` permission, but 
the Dataset branch (lines 932-943) correctly uses the fine-grained `allowEdit = 
isUserEditorOrAdmin(user, original.editors)` check for delete. A user with 
`can_write` but no editor/subject role on a semantic view can currently delete 
it — bypassing the intended ownership model where only admins or explicit 
subject editors may mutate semantic views.
   </div>
   
   
   </div>
   
   
   
   
   <small><i>Code Review Run #cf1e47</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