Skip to content

Commit

Permalink
Merge pull request kaltura#5392 from kaltura/Lynx-12.14.0-PLAT-7167
Browse files Browse the repository at this point in the history
PLAT-7167:allow only admin_console to insert and update parent-partner-id and p…
  • Loading branch information
noam-arad authored Apr 5, 2017
2 parents ece3a75 + c964add commit 04f53cd
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 2 deletions.
5 changes: 3 additions & 2 deletions api_v3/lib/types/partner/KalturaPartner.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ class KalturaPartner extends KalturaObject implements IFilterable
/**
* @var int
* @filter eq,gte,lte,in
* @readonly
* @requiresPermission insert,update
*/
public $partnerPackage;

Expand Down Expand Up @@ -293,7 +293,7 @@ class KalturaPartner extends KalturaObject implements IFilterable

/**
* @var int
* @insertonly
* @requiresPermission insert,update
*/
public $partnerParentId;

Expand Down Expand Up @@ -390,6 +390,7 @@ public function toPartner()
$this->validatePropertyNotNull("description");
$this->validatePropertyMaxLength("country", 2, true);
$this->validatePropertyMaxLength("state", 2, true);
$this->validateForInsert();

$partner = new Partner();
$partner = parent::toObject( $partner );
Expand Down
23 changes: 23 additions & 0 deletions deployment/permissions/object.KalturaPartner.ini
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,26 @@ permissionItem3.action = read
permissionItem3.partnerId = 0
permissionItem3.permissions = -2>SYSTEM_ADMIN_MP_REDIRECT, -2>SYSTEM_ADMIN_PUBLISHER_BASE

permissionItem4.object = KalturaPartner
permissionItem4.parameter = partnerPackage
permissionItem4.action = insert
permissionItem4.partnerId = 0
permissionItem4.permissions = -2>SYSTEM_ADMIN_MP_REDIRECT, -2>SYSTEM_ADMIN_PUBLISHER_BASE

permissionItem5.object = KalturaPartner
permissionItem5.parameter = partnerPackage
permissionItem5.action = update
permissionItem5.partnerId = 0
permissionItem5.permissions = -2>SYSTEM_ADMIN_MP_REDIRECT, -2>SYSTEM_ADMIN_PUBLISHER_BASE

permissionItem6.object = KalturaPartner
permissionItem6.parameter = partnerParentId
permissionItem6.action = insert
permissionItem6.partnerId = 0
permissionItem6.permissions = -2>SYSTEM_ADMIN_MP_REDIRECT, -2>SYSTEM_ADMIN_PUBLISHER_BASE

permissionItem7.object = KalturaPartner
permissionItem7.parameter = partnerParentId
permissionItem7.action = update
permissionItem7.partnerId = 0
permissionItem7.permissions = -2>SYSTEM_ADMIN_MP_REDIRECT, -2>SYSTEM_ADMIN_PUBLISHER_BASE
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php
/**
* @package deployment
* @subpackage lynx.roles_and_permissions
*/

$addPermissionsAndItemsScript = realpath(dirname(__FILE__) . '/../../../../') . '/alpha/scripts/utils/permissions/addPermissionsAndItems.php';

$config = realpath(dirname(__FILE__)) . '/../../../permissions/service.object.KalturaPartner.ini';
passthru("php $addPermissionsAndItemsScript $config");
18 changes: 18 additions & 0 deletions release-notes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
# Lynx 12.14.0 #

## Change permissions for admin_console and KalturaPartner ##

- Issue Type: Bug
- Issue ID: PLAT-7167

### Configuration ###
None.

### Deployment scripts ###

php /opt/kaltura/app/deployment/updates/scripts/add_permissions/2017_03_20_add_media_server_permission_get_permission.php

#### Known Issues & Limitations ####

None.

# Lynx 12.13.0 #

## Add media-server permission get permission ##
Expand Down

0 comments on commit 04f53cd

Please sign in to comment.