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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user