fix(auth): prevent system roles from being updated

- throw error in updateRole when role is system-protected
- hide edit button in roles table for system roles
- update README to reflect roles cannot be modified (not just renamed)
This commit is contained in:
2026-04-25 09:59:33 -04:00
parent ebdeea7287
commit 826ce3dcd1
3 changed files with 11 additions and 8 deletions
+9 -7
View File
@@ -81,13 +81,15 @@ const RolesPageClient = ({ canManage }) => {
align: 'right',
render: (role) => (
<div className="flex items-center justify-end gap-2">
<Button
variant="secondary"
onClick={() => openEdit(role.id)}
icon={PencilEdit01Icon}
>
Modifier
</Button>
{!role.is_system && (
<Button
variant="secondary"
onClick={() => openEdit(role.id)}
icon={PencilEdit01Icon}
>
Modifier
</Button>
)}
{!role.is_system && (
<Button
variant="danger"