allow edit admin role ssh and support null authDaemonMode

This commit is contained in:
miloschwartz
2026-02-20 20:25:14 -08:00
parent d6ba34aeea
commit 3f2bdf081f
8 changed files with 38 additions and 21 deletions

View File

@@ -102,16 +102,14 @@ export async function updateRole(
);
}
if (role[0].isAdmin) {
return next(
createHttpError(
HttpCode.FORBIDDEN,
`Cannot update a Admin role`
)
);
const orgId = role[0].orgId;
const isAdminRole = role[0].isAdmin;
if (isAdminRole) {
delete updateData.name;
delete updateData.description;
}
const orgId = role[0].orgId;
if (!orgId) {
return next(
createHttpError(