mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
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:
@@ -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>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user