Bump version to 1.4.5
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user