fix: show exclamation mark on negated permissions in org custom roles page (#21314)

Some permissions (in built-in roles only) have `Negated: true`, so the
UI was misleading users by showing that they had those permissions when
they really didn't.

<img width="1053" height="81" alt="image"
src="https://github.com/user-attachments/assets/ccf072ed-5821-4eb6-ac75-a1a563cf55c5"
/>
This commit is contained in:
Dean Sheather
2025-12-18 05:04:03 +00:00
committed by GitHub
parent e4a06f842a
commit b187d33a78
@@ -59,7 +59,8 @@ const PermissionsPill: FC<PermissionPillProps> = ({
return (
<Pill css={styles.permissionPill}>
<b>{resource}</b>: {actions.map((p) => p.action).join(", ")}
<b>{resource}</b>:{" "}
{actions.map((p) => `${p.negate ? "!" : ""}${p.action}`).join(", ")}
</Pill>
);
};