Bump version to 1.4.5

This commit is contained in:
2026-07-21 21:53:55 +01:00
parent 5e7df5e55c
commit 370ec81c33
7 changed files with 25 additions and 23 deletions
+5 -2
View File
@@ -202,6 +202,9 @@ function getLegacyPermissionTargets(permissionKey) {
const sectionKey = parts[0];
const actionKey = parts[1];
if (normalizedKey === 'screens.allow') {
return ['clients.allow'];
}
if (actionKey === 'view') {
return [`${sectionKey}.read`];
}
@@ -265,7 +268,7 @@ async function backfillLegacyRbacSchema(pool) {
for (const row of rolePermissionRows || []) {
const currentKey = getPermissionKey(row);
const targetKeys = getLegacyPermissionTargets(currentKey);
if (currentKey.endsWith('.view') || currentKey.endsWith('.manage')) {
if (currentKey.endsWith('.view') || currentKey.endsWith('.manage') || currentKey === 'screens.allow') {
for (const targetKey of targetKeys) {
addRoleTarget(Number(row.role_id), targetKey);
}
@@ -276,7 +279,7 @@ async function backfillLegacyRbacSchema(pool) {
for (const row of permissionRows || []) {
const currentKey = getPermissionKey(row);
if (currentKey.endsWith('.view') || currentKey.endsWith('.manage')) {
if (currentKey.endsWith('.view') || currentKey.endsWith('.manage') || currentKey === 'screens.allow') {
legacyPermissionRowIds.push(Number(row.id));
}
}