OAuth2 OpenID Connect provider support etc. #3

Merged
LeoVasanko merged 65 commits from oidconnect into main 2026-02-18 02:40:27 +00:00
Showing only changes of commit e02ec82ff3 - Show all commits
+4 -4
View File
@@ -324,10 +324,10 @@ async function performUserDeletion(userUuid, userName, orgUuid) {
}
}
async function moveUserToRole(user, targetRoleUuid) {
if (user.role_uuid === targetRoleUuid) return
async function moveUserToRole(userUuid, user, targetRoleUuid) {
if (user.role === targetRoleUuid) return
try {
await apiJson(`/auth/api/admin/users/${user.uuid}/role`, {
await apiJson(`/auth/api/admin/users/${userUuid}/role`, {
method: 'PATCH',
body: { role_uuid: targetRoleUuid }
})
@@ -353,7 +353,7 @@ function onRoleDrop(e, org, role) {
const data = JSON.parse(e.dataTransfer.getData('text/plain'))
if (data.org !== org.uuid) return // only within same org
const user = org.users[data.user_uuid]
if (user) moveUserToRole(user, role.uuid)
if (user) moveUserToRole(data.user_uuid, user, role.uuid)
} catch (_) { /* ignore */ }
}