CC-6105: DJs can edit playlists, smartblocks, and webstreams they do not own
This commit is contained in:
parent
13f62cc118
commit
b312189a7b
3 changed files with 29 additions and 1 deletions
|
@ -74,6 +74,16 @@ class PlaylistController extends Zend_Controller_Action
|
|||
private function createFullResponse($obj = null, $isJson = false,
|
||||
$formIsValid = false)
|
||||
{
|
||||
$user = Application_Model_User::getCurrentUser();
|
||||
$isAdminOrPM = $user->isUserType(array(UTYPE_SUPERADMIN, UTYPE_ADMIN, UTYPE_PROGRAM_MANAGER));
|
||||
|
||||
if (!$isAdminOrPM && $obj->getCreatorId() != $user->getId()) {
|
||||
$this->view->objType = $obj instanceof Application_Model_Block ? "block" : "playlist";
|
||||
$this->view->obj = $obj;
|
||||
$this->view->html = $this->view->render('playlist/permission-denied.phtml');
|
||||
return;
|
||||
}
|
||||
|
||||
$isBlock = false;
|
||||
$viewPath = 'playlist/playlist.phtml';
|
||||
if ($obj instanceof Application_Model_Block) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue