fix(ui): do not allow protected roles (#2808)

This commit is contained in:
Shekar Siri 2024-12-03 14:15:38 +01:00 committed by GitHub
parent e7ad4c8bd0
commit 1cdb9bd06d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -18,7 +18,7 @@ function UserForm() {
const isSaving = userStore.saving;
const user: any = userStore.instance || userStore.initUser();
const roles = roleStore.list
.filter((r) => (r.isProtected ? user.isSuperAdmin : true))
.filter((r) => (r.protected ? user.isSuperAdmin : true))
.map((r) => ({ label: r.name, value: r.roleId }));
const onChangeCheckbox = (e: any) => {