CC-3590: Calendar GUI->DJ user should not be able to invoke "Add Show" window
-add user type into javascript as a variable so we can check permissions on js side
This commit is contained in:
parent
16f3a331bb
commit
da8a5296b0
3 changed files with 18 additions and 4 deletions
|
@ -94,7 +94,7 @@ function pad(number, length) {
|
|||
function dayClick(date, allDay, jsEvent, view){
|
||||
// The show from will be preloaded if the user is admin or program manager.
|
||||
// Hence, if the user if DJ then it won't open anything.
|
||||
if($.trim($("#add-show-form").html()) != ""){
|
||||
if(userType == "A" || userType == "P"){
|
||||
var now, today, selected, chosenDate, chosenTime;
|
||||
|
||||
now = adjustDateToServerDate(new Date(), serverTimezoneOffset);
|
||||
|
@ -212,7 +212,9 @@ function viewDisplay( view ) {
|
|||
}
|
||||
|
||||
if(($("#add-show-form").length == 1) && ($("#add-show-form").css('display')=='none') && ($('.fc-header-left > span').length == 5)) {
|
||||
if($.trim($("#add-show-form").html()) != ""){
|
||||
|
||||
//userType is defined in bootstrap.php, and is derived from the currently logged in user.
|
||||
if(userType == "A" || userType == "P"){
|
||||
makeAddShowButton();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue