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


##########
superset/mcp_service/chart/tool/update_chart_preview.py:
##########
@@ -44,7 +44,7 @@
 logger = logging.getLogger(__name__)
 
 
-@tool(tags=["mutate"])
+@tool(tags=["mutate"], class_permission_name="Chart")

Review Comment:
   <div>
   
   
   <div id="suggestion">
   <div id="issue"><b>Missing write permission for mutate tool</b></div>
   <div id="fix">
   
   The tool is tagged "mutate" but lacks method_permission_name, defaulting to 
"read" permission check. For mutate operations that modify chart data, it 
should specify method_permission_name="write" to require write access instead.
   </div>
   
   
   <details>
   <summary>
   <b>Code suggestion</b>
   </summary>
   <blockquote>Check the AI-generated fix before applying</blockquote>
   <div id="code">
   
   
   ````suggestion
   @tool(tags=["mutate"], class_permission_name="Chart", 
method_permission_name="write")
   ````
   
   </div>
   </details>
   
   
   
   </div>
   
   
   
   
   <small><i>Code Review Run #cad346</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