summaryrefslogtreecommitdiff
path: root/pages/switch_channel.ecpp
diff options
context:
space:
mode:
Diffstat (limited to 'pages/switch_channel.ecpp')
-rw-r--r--pages/switch_channel.ecpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/pages/switch_channel.ecpp b/pages/switch_channel.ecpp
index 9b8b48b..2cffefc 100644
--- a/pages/switch_channel.ecpp
+++ b/pages/switch_channel.ecpp
@@ -3,6 +3,7 @@
#include "exception.h"
#include "tasks.h"
#include "tools.h"
+#include "users.h"
using namespace std;
using namespace vdrlive;
@@ -16,6 +17,9 @@ using namespace vdrlive;
bool ajaxReq = !async.empty() && (lexical_cast<int>(async) != 0);
string referrer;
+ if (!cUser::CurrentUserHasRightTo(UR_SWITCHCHNL))
+ throw HtmlError( tr("Sorry, no permission. Please contact your administrator!") );
+
if (ajaxReq) {
reply.setContentType( "application/xml" );
}