diff --git a/src/services/permissions-getter.js b/src/services/permissions-getter.js index f1dbac8b2..d3b653619 100644 --- a/src/services/permissions-getter.js +++ b/src/services/permissions-getter.js @@ -61,14 +61,14 @@ class PermissionsGetter { : null; } - _getScopePermissions(renderingId, collectionName, { environmentId } = {}) { + _getSegmentsPermissions(renderingId, collectionName, { environmentId } = {}) { const getPermissionsInRendering = this._getPermissionsInRendering( renderingId, { environmentId }, ); return getPermissionsInRendering && getPermissionsInRendering.data && getPermissionsInRendering.data[collectionName] - ? getPermissionsInRendering.data[collectionName].scope + ? getPermissionsInRendering.data[collectionName].segments : null; } @@ -116,6 +116,7 @@ class PermissionsGetter { exportEnabled: collection.export, }, scope: modelPermissions.scope, + segments: modelPermissions.segments, }; if (modelPermissions.actions) { @@ -270,14 +271,14 @@ class PermissionsGetter { const collectionPermissions = this._getCollectionPermissions( renderingId, collectionName, { environmentId }, ); - const scope = this._getScopePermissions(renderingId, collectionName, { environmentId }); + const segments = this._getSegmentsPermissions(renderingId, collectionName, { environmentId }); const stats = this._getStatsPermissions({ environmentId }); return { collection: collectionPermissions ? collectionPermissions.collection : null, actions: collectionPermissions ? collectionPermissions.actions : null, stats, - scope, + segments, }; } }