CC-3452: Live Stream: DJs assigned to the show and Program Managers should
be able to control switches and able to kick out connection - kickout buttons and switch buttons are now visible to everyone. - clicking buttons without correct permission will return proper error msg.
This commit is contained in:
parent
2beadc9301
commit
4595da9087
10 changed files with 98 additions and 62 deletions
|
@ -1,11 +0,0 @@
|
|||
<?php
|
||||
|
||||
class Airtime_View_Helper_IsAdmin extends Zend_View_Helper_Abstract
|
||||
{
|
||||
public function isAdmin()
|
||||
{
|
||||
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
|
||||
$user = new Application_Model_User($userInfo->id);
|
||||
return $user->isAdmin();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
class Airtime_View_Helper_IsPermissionAllowed extends Zend_View_Helper_Abstract
|
||||
{
|
||||
public function IsPermissionAllowed()
|
||||
{
|
||||
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
|
||||
$user = new Application_Model_User($userInfo->id);
|
||||
|
||||
$show = Application_Model_Show::GetCurrentShow();
|
||||
$show_id = isset($show['id'])?$show['id']:0;
|
||||
if($user->canSchedule($show_id)){
|
||||
return true;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue