"Permission Denied" translated to es,fr,de and pt

This commit is contained in:
joker-x 2020-08-30 00:35:47 +02:00
parent 96d5fc98c0
commit 7ed5243a32
6 changed files with 14 additions and 7 deletions

View file

@ -9,6 +9,8 @@ const interoperableErrors = require('../../shared/interoperable-errors');
const log = require('../lib/log');
const {getGlobalNamespaceId} = require('../../shared/namespaces');
const {getAdminId} = require('../../shared/users');
const { tMark } = require('../lib/translate');
// TODO: This would really benefit from some permission cache connected to rebuildPermissions
// A bit of the problem is that the cache would have to expunged as the result of other processes modifying entites/permissions
@ -449,7 +451,7 @@ async function regenerateRoleNamesTable() {
function throwPermissionDenied() {
throw new interoperableErrors.PermissionDeniedError('Permission denied');
throw new interoperableErrors.PermissionDeniedError(tMark('permissionDenied'));
}
async function removeDefaultShares(tx, user) {
@ -726,4 +728,4 @@ module.exports.regenerateRoleNamesTable = regenerateRoleNamesTable;
module.exports.getGlobalPermissions = getGlobalPermissions;
module.exports.getPermissionsTx = getPermissionsTx;
module.exports.filterPermissionsByRestrictedAccessHandler = filterPermissionsByRestrictedAccessHandler;
module.exports.isAccessibleByRestrictedAccessHandler = isAccessibleByRestrictedAccessHandler;
module.exports.isAccessibleByRestrictedAccessHandler = isAccessibleByRestrictedAccessHandler;