SYNC: Merge pull request #12 from dbgate/feature/team-files

This commit is contained in:
Jan Prochazka
2025-09-26 12:44:08 +02:00
committed by Diflow
parent 925e3a67da
commit 494b33bd7a
15 changed files with 510 additions and 104 deletions

View File

@@ -327,7 +327,7 @@ async function testStandardPermission(permission, req, loadedPermissions) {
loadedPermissions = await loadPermissionsFromRequest(req);
}
if (!hasPermission(permission, loadedPermissions)) {
throw new Error('DBGM-00265 Permission not granted');
throw new Error(`DBGM-00265 Permission ${permission} not granted`);
}
}
@@ -344,7 +344,7 @@ async function testDatabaseRolePermission(conid, database, requiredRole, req) {
const requiredIndex = getDatabaseRoleLevelIndex(requiredRole);
const roleIndex = getDatabaseRoleLevelIndex(role);
if (roleIndex < requiredIndex) {
throw new Error('DBGM-00266 Permission not granted');
throw new Error(`DBGM-00266 Permission ${requiredRole} not granted`);
}
}