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


##########
superset-frontend/src/explore/components/useExploreAdditionalActionsMenu/useExploreAdditionalActionsMenu.test.tsx:
##########
@@ -112,6 +121,19 @@ beforeEach(() => {
   mockExportChart.mockResolvedValue(undefined);
 });
 
+test('hides Edit chart properties from a user who is not an owner/editor of 
the chart (regression #38884)', async () => {
+  render(
+    <TestComponent
+      {...defaultProps}
+      slice={{ slice_id: 1, slice_name: 'Test Chart', editors: [2] }}
+    />,
+    { useRedux: true },
+  );
+
+  expect(await screen.findByText('Data Export Options')).toBeInTheDocument();
+  expect(screen.queryByText('Edit chart properties')).not.toBeInTheDocument();

Review Comment:
   <!-- Bito Reply -->
   The suggestion provided by the reviewer is appropriate. It correctly 
identifies that the test validates an unimplemented gate and recommends 
applying the same `editors`/`user_subjects` check used elsewhere in the 
codebase to ensure consistent access control for the 'Edit chart properties' 
menu item.



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