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


##########
tests/unit_tests/mcp_service/test_rbac_tool_enforcement.py:
##########
@@ -110,6 +110,24 @@
         "write",
         "Dataset",
     ),
+    (
+        "update_dataset",
+        {"dataset_id": 1, "description": "denied"},
+        "write",
+        "Dataset",
+    ),
+    (
+        "delete_dataset",
+        {"identifier": 1},
+        "write",
+        "Dataset",
+    ),
+    (
+        "restore_dataset",
+        {"identifier": 1},
+        "write",
+        "Dataset",
+    ),

Review Comment:
   <!-- Bito Reply -->
   Your analysis is correct. Since `_method_permission_name` is explicitly set 
to "write" for these tools before the authentication hook is applied, the 
fallback to "read" does not occur. The test expectation is already aligned with 
the "write" permission, so the suggestion to change the test expectation is 
unnecessary and would indeed incorrectly downgrade the permission requirement.
   
   **tests/unit_tests/mcp_service/test_rbac_tool_enforcement.py**
   ```
   (
           "delete_dataset",
           {"identifier": 1},
           "write",
           "Dataset",
       ),
   ```



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