CC-3877 : Now Playing-> Show manipulation buttons should be disabled for guest user and DJ's who are not assigned to the show
This commit is contained in:
parent
8b4c876c5b
commit
d91850b1ca
|
@ -22,6 +22,10 @@ class ShowbuilderController extends Zend_Controller_Action
|
|||
|
||||
$request = $this->getRequest();
|
||||
$baseUrl = $request->getBaseUrl();
|
||||
$user = Application_Model_User::GetCurrentUser();
|
||||
|
||||
$userType = $user->getType();
|
||||
$this->view->headScript()->appendScript("localStorage.setItem( 'user-type', '$userType' );");
|
||||
|
||||
$data = Application_Model_Preference::GetValue("library_datatable", true);
|
||||
if ($data != "") {
|
||||
|
@ -60,8 +64,7 @@ class ShowbuilderController extends Zend_Controller_Action
|
|||
$this->view->headLink()->appendStylesheet($baseUrl.'/css/datatables/css/ColReorder.css?'.$CC_CONFIG['airtime_version']);
|
||||
|
||||
$this->view->headScript()->appendFile($this->view->baseUrl('/js/airtime/library/events/library_showbuilder.js?'.$CC_CONFIG['airtime_version']),'text/javascript');
|
||||
|
||||
$user = Application_Model_User::GetCurrentUser();
|
||||
|
||||
$refer_sses = new Zend_Session_Namespace('referrer');
|
||||
|
||||
if ($request->isPost()) {
|
||||
|
|
|
@ -103,9 +103,12 @@ var AIRTIME = (function(AIRTIME){
|
|||
};
|
||||
|
||||
mod.checkCancelButton = function() {
|
||||
var $current = $sbTable.find(".sb-current-show.sb-allowed");
|
||||
var $current = $sbTable.find(".sb-current-show.sb-allowed"),
|
||||
//this user type should be refactored into a separate users module later
|
||||
//when there's more time and more JS will need to know user data.
|
||||
userType = localStorage.getItem('user-type');
|
||||
|
||||
if ($current.length !== 0) {
|
||||
if ($current.length !== 0 && (userType === 'A' || userType === 'P')) {
|
||||
AIRTIME.button.enableButton("sb-button-cancel");
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Reference in New Issue