Refer permissions by UUID rather than scope.

This commit is contained in:
Leo Vasanko
2026-01-24 00:06:08 +00:00
parent 5585651e57
commit 2227a9bf6f
7 changed files with 149 additions and 98 deletions
+2 -2
View File
@@ -299,13 +299,13 @@ async function performPermissionDeletion(permissionScope) {
}
function deletePermission(p) {
const userCount = permissionSummary.value[p.scope]?.userCount || 0
const userCount = permissionSummary.value[p.uuid]?.userCount || 0
// Count roles that have this permission
let roleCount = 0
for (const org of orgs.value) {
for (const role of org.roles) {
if (role.permissions.includes(p.scope)) {
if (role.permissions.includes(p.uuid)) {
roleCount++
}
}