diff --git a/src/app/channel/media/queue.js b/src/app/channel/media/queue.js index 597c062..628c112 100644 --- a/src/app/channel/media/queue.js +++ b/src/app/channel/media/queue.js @@ -357,6 +357,12 @@ class queue{ throw loggerUtils.exceptionSmith(`Unable to find channel document ${this.channel.name} while queue item!`, "queue"); } + //If the user doesn't have permission to be doing this shit + if(!((!this.locked && await chanDB.permCheck(socket.user, 'scheduleMedia')) || await chanDB.permCheck(socket.user, 'scheduleAdmin'))){ + //Fuggettabouttit! + return; + } + //If something is playing if(this.nowPlaying != null){ //Capture currently playing object @@ -403,7 +409,7 @@ class queue{ ); //Validate mode input, and default to overwrite - this.liveMode = (data.mode == "pushback") ? "pushback" : "overwrite"; + this.liveMode = (data != null && data.mode == "pushback") ? "pushback" : "overwrite"; //Throw stream lock this.streamLock = true;