Skip to content

Commit 885a6f9

Browse files
committed
RBAC: left-align Roles page role columns (header + cells)
1 parent f5c34c7 commit 885a6f9

1 file changed

Lines changed: 6 additions & 9 deletions

File tree

  • apps/webapp/app/routes/_app.orgs.$organizationSlug.settings.roles

apps/webapp/app/routes/_app.orgs.$organizationSlug.settings.roles/route.tsx

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,8 @@ export default function Page() {
206206
<TableRow>
207207
<TableHeaderCell>Permission</TableHeaderCell>
208208
{columns.map(({ role }) => (
209-
<TableHeaderCell key={role.id} alignment="center">
210-
<div className="flex items-center justify-center gap-1">
209+
<TableHeaderCell key={role.id}>
210+
<div className="flex items-center gap-1">
211211
<span>{role.name}</span>
212212
<PlanBadge
213213
roleId={role.id}
@@ -244,10 +244,7 @@ export default function Page() {
244244
<code className="text-xs">{permission.name}</code>
245245
</TableCell>
246246
{columns.map(({ role }) => (
247-
<TableCell
248-
key={role.id}
249-
alignment="center"
250-
>
247+
<TableCell key={role.id}>
251248
<RoleCell
252249
permissionName={permission.name}
253250
rolePermissions={role.permissions}
@@ -324,7 +321,7 @@ function RoleCell({
324321
// No rule matches — the role denies this permission by omission.
325322
return (
326323
<span className="text-text-dimmed" aria-label="Not granted">
327-
<XMarkIcon className="mx-auto size-4" />
324+
<XMarkIcon className="size-4" />
328325
</span>
329326
);
330327
}
@@ -337,7 +334,7 @@ function RoleCell({
337334
if (allowed.length === 0) {
338335
return (
339336
<span className="text-error" aria-label="Denied">
340-
<XMarkIcon className="mx-auto size-4" />
337+
<XMarkIcon className="size-4" />
341338
</span>
342339
);
343340
}
@@ -347,7 +344,7 @@ function RoleCell({
347344
// alongside the tick so the user sees the restriction.
348345
const conditionalDeny = denied.find((p) => p.conditions);
349346
return (
350-
<div className="flex items-center justify-center gap-1">
347+
<div className="flex items-center gap-1">
351348
<span className="text-success" aria-label="Allowed">
352349
<CheckIcon className="size-4" />
353350
</span>

0 commit comments

Comments
 (0)