This commit is contained in:
joker-x 2020-08-30 08:10:35 +02:00
parent 27874027a9
commit a42f629c7e
2 changed files with 0 additions and 4 deletions

View file

@ -45,7 +45,6 @@ async function listDTAjax(context, params) {
} }
async function listWithCreateCampaignPermissionDTAjax(context, params) { async function listWithCreateCampaignPermissionDTAjax(context, params) {
shares.enforceGlobalPermission(context, 'manageChannels');
return await dtHelpers.ajaxListWithPermissions( return await dtHelpers.ajaxListWithPermissions(
context, context,
[{ entityTypeId: 'channel', requiredOperations: ['createCampaign'] }], [{ entityTypeId: 'channel', requiredOperations: ['createCampaign'] }],

View file

@ -13,7 +13,6 @@ const dependencyHelpers = require('../lib/dependency-helpers');
const allowedKeys = new Set(['name', 'description', 'namespace']); const allowedKeys = new Set(['name', 'description', 'namespace']);
async function listTree(context) { async function listTree(context) {
shares.enforceGlobalPermission(context, 'manageNamespaces');
enforce(!context.user.admin, 'listTree is not supposed to be called by assumed admin'); enforce(!context.user.admin, 'listTree is not supposed to be called by assumed admin');
const entityType = entitySettings.getEntityType('namespace'); const entityType = entitySettings.getEntityType('namespace');
@ -111,7 +110,6 @@ function hash(entity) {
} }
async function getById(context, id) { async function getById(context, id) {
shares.enforceGlobalPermission(context, 'manageNamespaces');
return await knex.transaction(async tx => { return await knex.transaction(async tx => {
await shares.enforceEntityPermissionTx(tx, context, 'namespace', id, 'view'); await shares.enforceEntityPermissionTx(tx, context, 'namespace', id, 'view');
const entity = await tx('namespaces').where('id', id).first(); const entity = await tx('namespaces').where('id', id).first();
@ -121,7 +119,6 @@ async function getById(context, id) {
} }
async function getChildrenTx(tx, context, id) { async function getChildrenTx(tx, context, id) {
shares.enforceGlobalPermission(context, 'manageNamespaces');
await shares.enforceEntityPermissionTx(tx, context, 'namespace', id, 'view'); await shares.enforceEntityPermissionTx(tx, context, 'namespace', id, 'view');
const entityType = entitySettings.getEntityType('namespace'); const entityType = entitySettings.getEntityType('namespace');