mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-31 15:06:42 +00:00
fix no admin user in roles dropdown
This commit is contained in:
@@ -126,16 +126,10 @@ export default function AccessControlsPage() {
|
|||||||
form.setValue("autoProvisioned", user.autoProvisioned || false);
|
form.setValue("autoProvisioned", user.autoProvisioned || false);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const allRoleOptions = useMemo(
|
const allRoleOptions = roles.map((role) => ({
|
||||||
() =>
|
id: role.roleId.toString(),
|
||||||
roles
|
text: role.name
|
||||||
.map((role) => ({
|
}));
|
||||||
id: role.roleId.toString(),
|
|
||||||
text: role.name
|
|
||||||
}))
|
|
||||||
.filter((role) => role.text !== "Admin"),
|
|
||||||
[roles]
|
|
||||||
);
|
|
||||||
|
|
||||||
function setRoleTags(updater: Tag[] | ((prev: Tag[]) => Tag[])) {
|
function setRoleTags(updater: Tag[] | ((prev: Tag[]) => Tag[])) {
|
||||||
const prev = form.getValues("roles");
|
const prev = form.getValues("roles");
|
||||||
|
|||||||
Reference in New Issue
Block a user