Skip to content

ACL pages routing fix - removed AclPrincipalGroupEditor#2336

Merged
jvorcak merged 2 commits intomasterfrom
fix/acl-pages-routing
Mar 24, 2026
Merged

ACL pages routing fix - removed AclPrincipalGroupEditor#2336
jvorcak merged 2 commits intomasterfrom
fix/acl-pages-routing

Conversation

@jvorcak
Copy link
Copy Markdown
Collaborator

@jvorcak jvorcak commented Mar 23, 2026

In current master branch, when you click on Create ACL, my browser freezes. + the onClick handler tries to redirect & open a modal which doesn't make sense to me.

This should hopefully make the behavior a bit more consistent.

@weeco
Copy link
Copy Markdown
Contributor

weeco commented Mar 23, 2026

@claude Review the PR. Make sure that all codepaths and deployment types support this (for example clicking Create ACLs on the user creation success dialog should also redirect to the page now and no longer the modal). Or schema registry authz is not supported for non redpanda deployments - are we handling this?

@claude
Copy link
Copy Markdown

claude bot commented Mar 23, 2026

Claude finished @weeco's task in 2m 26s —— View job


PR Review

  • Read changed files
  • Search for all ACL creation/modal codepaths
  • Check user creation success dialog behavior
  • Check schema registry authz handling for non-Redpanda deployments

Summary

The PR correctly removes the AclPrincipalGroupEditor modal from AclsTab. The old "Create ACLs" button was simultaneously calling navigate({ to: '/security/acls/create', ... }) and setting edittingPrincipalGroup state (which rendered the old modal inline), causing both to fight over the UI — likely the source of the browser freeze. The fix correctly narrows the click handler to navigation only.


Reviewer Questions

1. User creation success dialog (create-user-confirmation-modal.tsx)

The success dialog was never using AclPrincipalGroupEditor — it always used a <Link> for page navigation. So there is no regression here.

However, the current link (line 99) navigates to the ACLs list tab in a new tab, not to the ACL create form:

<Link params={{ tab: 'acls' }} rel="noopener noreferrer" target="_blank" to="/security/$tab">
  Create ACLs
</Link>

Since the ACL create page supports principalType and principalName search params, this could be improved to pre-fill the newly created user:

<Link to="/security/acls/create" search={{ principalType: 'User', principalName: username }}>
  Create ACLs
</Link>

This is a pre-existing UX gap, not a regression introduced by this PR. Worth a follow-up ticket. Fix this →

2. Schema registry authz for non-Redpanda deployments

Properly handled. In supported-features.ts (lines 96–101), SchemaRegistryACLApi defaults to { supported: false } when no endpoint compatibility data is present — which is the case for non-Redpanda deployments. create-acl.tsx reads this flag:

const schemaRegistryEnabled = useSupportedFeaturesStore((s) => s.schemaRegistryACLApi);

And the Subject/SchemaRegistry resource type options are disabled when !isSchemaRegistryEnabled. No issues here.


Issues Found

Stale test mocks in acl-list.roles.test.tsx

The test file still mocks the removed AclPrincipalGroupEditor export and the createEmpty* functions that acl-list.tsx no longer imports:

// acl-list.roles.test.tsx lines 226-238
vi.mock('./models', () => ({
  createEmptyClusterAcl: vi.fn(),      // ← no longer imported by acl-list.tsx
  createEmptyConsumerGroupAcl: vi.fn(), // ← no longer imported
  createEmptyTopicAcl: vi.fn(),         // ← no longer imported
  createEmptyTransactionalIdAcl: vi.fn(), // ← no longer imported
  principalGroupsView: { principalGroups: [] },
}));

vi.mock('./principal-group-editor', () => ({
  AclPrincipalGroupEditor: () => null,  // ← component no longer exists
}));

These are harmless dead code but should be cleaned up to avoid confusion. Fix this →


Verdict

The core fix is correct and safe. The schema registry authz is handled properly for non-Redpanda deployments. The user creation dialog was already using page navigation (not the modal). The main thing to address before merging is the stale test mocks in acl-list.roles.test.tsx. The "Create ACLs" link in the user creation dialog is a pre-existing UX improvement worth a follow-up.

@weeco weeco self-requested a review March 23, 2026 21:53
@jvorcak jvorcak merged commit 074e5b7 into master Mar 24, 2026
17 checks passed
@jvorcak jvorcak deleted the fix/acl-pages-routing branch March 24, 2026 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants