Skip to content

Commit 1342127

Browse files
authored
fix(dashboard): hide Clerk role info if RBAC disabled fixes NV-6486 (#8899)
1 parent 83bd3d2 commit 1342127

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

apps/dashboard/src/index.css

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,4 +374,19 @@
374374
.nt-relative.nt-flex.nt-shrink-0.nt-flex-col.nt-justify-center.nt-items-center.nt-gap-1.nt-mt-auto.nt-py-3.nt-text-foreground-alpha-400 {
375375
display: none !important;
376376
}
377+
378+
/*
379+
* Hide role column in Clerk organization members table when RBAC is disabled
380+
* Unfortunately Clerk doesn't provide a better appearance selector.
381+
*/
382+
.hide-role-column .cl-tableHeaderCell[data-localization-key*="role"],
383+
.hide-role-column .cl-tableBodyCell:nth-child(3) {
384+
display: none !important;
385+
}
386+
387+
/* Show role column in Clerk organization members table when RBAC is enabled */
388+
.show-role-column .cl-tableHeaderCell[data-localization-key*="role"],
389+
.show-role-column .cl-tableBodyCell:nth-child(3) {
390+
display: table-cell !important;
391+
}
377392
}

apps/dashboard/src/pages/settings.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ export function SettingsPage() {
173173
<TabsContent value="team" className="rounded-lg">
174174
<motion.div {...FADE_ANIMATION}>
175175
<Card className="border-none shadow-none">
176-
<div className="pb-6 pt-4">
176+
<div className={`pb-6 pt-4 ${isRbacEnabled ? 'show-role-column' : 'hide-role-column'}`}>
177177
{isRbacEnabledFlag && !isRbacEnabled && (
178178
<InlineToast
179179
title="Tip:"

0 commit comments

Comments
 (0)