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:
Naomi Aro 2012-05-24 18:10:36 +02:00
parent 8b4c876c5b
commit d91850b1ca
2 changed files with 10 additions and 4 deletions

View file

@ -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 {