Skip to content

Commit

Permalink
Orion 15.6.0 plat 10084 adding read only permission to ESEARCh (#8713)
Browse files Browse the repository at this point in the history
* Orion-15.6.0-PLAT-10084-Adding read-only permission to ESearch

* Updating release notes
  • Loading branch information
ZurPHP committed Aug 20, 2019
1 parent 61cb1fe commit e9d7f87
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 10 deletions.
9 changes: 1 addition & 8 deletions alpha/lib/enums/PermissionName.php
Expand Up @@ -6,7 +6,6 @@
interface PermissionName extends BaseEnum
{
// special services

const FEATURE_ANALYTICS_TAB = 'FEATURE_ANALYTICS_TAB';
const FEATURE_ANALYTICS_API = 'FEATURE_ANALYTICS_API';
const FEATURE_508_PLAYERS = 'FEATURE_508_PLAYERS';
Expand Down Expand Up @@ -85,7 +84,6 @@ interface PermissionName extends BaseEnum
const FEATURE_ALLOW_VAST_CUE_POINT_NO_URL = 'FEATURE_ALLOW_VAST_CUE_POINT_NO_URL';

// base system permissions

const USER_SESSION_PERMISSION = 'BASE_USER_SESSION_PERMISSION';
const ALWAYS_ALLOWED_ACTIONS = 'ALWAYS_ALLOWED_ACTIONS';
const ALWAYS_ALLOWED_FROM_INTERNAL_IP_ACTIONS = 'ALWAYS_ALLOWED_FROM_INTERNAL_IP_ACTIONS';
Expand All @@ -96,7 +94,6 @@ interface PermissionName extends BaseEnum
const KMC_READ_ONLY = 'KMC_READ_ONLY';

// system admin and admin console permissions

const SYSTEM_ADMIN_BASE = 'SYSTEM_ADMIN_BASE';

const SYSTEM_ADMIN_PUBLISHER_BASE = 'SYSTEM_ADMIN_PUBLISHER_BASE';
Expand Down Expand Up @@ -132,11 +129,9 @@ interface PermissionName extends BaseEnum
const SYSTEM_ADMIN_CATALOG_ITEM_MODIFY = "reach.SYSTEM_ADMIN_CATALOG_ITEM_MODIFY";

// batch related permissions

const BATCH_BASE = 'BATCH_BASE';

// user actions permissions

const CONTENT_INGEST_UPLOAD = 'CONTENT_INGEST_UPLOAD';
const CONTENT_INGEST_BULK_UPLOAD = 'CONTENT_INGEST_BULK_UPLOAD';
const CONTENT_INGEST_FEED = 'CONTENT_INGEST_FEED';
Expand Down Expand Up @@ -235,9 +230,8 @@ interface PermissionName extends BaseEnum
const FEATURE_SELF_SERVE = 'FEATURE_SELF_SERVE';
const FEATURE_SIP = 'FEATURE_SIP';


const ESEARCH_READ_PERMISSION = 'ESEARCH_READ_PERMISSION';
// KMC only permissions

const ADVERTISING_BASE = 'ADVERTISING_BASE';
const ADVERTISING_UPDATE_SETTINGS = 'ADVERTISING_UPDATE_SETTINGS';
const PLAYLIST_EMBED_CODE = 'PLAYLIST_EMBED_CODE';
Expand All @@ -247,7 +241,6 @@ interface PermissionName extends BaseEnum


// not valid yet

const ADMIN_WHITE_BRANDING = 'ADMIN_WHITE_BRANDING';

// new category permissions for the categoryUser
Expand Down
8 changes: 8 additions & 0 deletions deployment/permissions/partner.0.ini
Expand Up @@ -1434,3 +1434,11 @@ permission223.dependsOnPermissionNames =
permission223.tags =
permission223.partnerGroup =

permission224.partnerId = 0
permission224.type = 1
permission224.name = ESEARCH_READ_PERMISSION
permission224.friendlyName = "ESearch read permission"
permission224.description = "ESearch read permission"
permission224.dependsOnPermissionNames =
permission224.tags =
permission224.partnerGroup =
4 changes: 2 additions & 2 deletions deployment/permissions/service.elasticsearch.esearch.ini
Expand Up @@ -2,12 +2,12 @@
permissionItem1.service = elasticsearch_esearch
permissionItem1.action = searchEntry
permissionItem1.partnerId = 0
permissionItem1.permissions = BASE_USER_SESSION_PERMISSION, -1>BATCH_BASE, -1>PARTNER_-1_GROUP_*_PERMISSION
permissionItem1.permissions = BASE_USER_SESSION_PERMISSION, -1>BATCH_BASE, -1>PARTNER_-1_GROUP_*_PERMISSION, ESEARCH_READ_PERMISSION

permissionItem2.service = elasticsearch_esearch
permissionItem2.action = searchCategory
permissionItem2.partnerId = 0
permissionItem2.permissions = BASE_USER_SESSION_PERMISSION
permissionItem2.permissions = BASE_USER_SESSION_PERMISSION, ESEARCH_READ_PERMISSION

permissionItem3.service = elasticsearch_esearch
permissionItem3.action = searchUser
Expand Down
@@ -0,0 +1,12 @@
<?php
/**
* @package deployment
* @subpackage orion.roles_and_permissions
*/

$addPermissionsScript = realpath(dirname(__FILE__) . '/../../../../') . '/alpha/scripts/utils/permissions/addPermissionsAndItems.php';
$addConfig = realpath(dirname(__FILE__)) . '/../../../permissions/partner.0.ini';
passthru("php $addPermissionsScript $addConfig");

$addConfig = realpath(dirname(__FILE__)) . '/../../../permissions/service.elasticsearch.esearch.ini';
passthru("php $addPermissionsScript $addConfig");
11 changes: 11 additions & 0 deletions release-notes.md
@@ -1,3 +1,14 @@
# Orion 15.6.0 #

- Issue Type: Task
- Issue ID: PLAT-10084

### configuration ###
None

### Deployment scripts ###
php deployment/updates/scripts/add_permissions/2019_08_20_update_esearch_permissions.php

# Orion 15.5.0 #

## Adding monitoring-proxy partner ##
Expand Down

0 comments on commit e9d7f87

Please sign in to comment.