Refer permissions by UUID rather than scope.

This commit is contained in:
2026-01-24 00:06:08 +00:00
parent 57748876cb
commit a9ef20969e
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++
}
}