From 844fb6549414258296321648127a0d19fb2f49b8 Mon Sep 17 00:00:00 2001 From: Dieter Hametner Date: Sun, 4 Sep 2011 21:17:52 +0200 Subject: Allow to remove rights to delete recordings. According to the bug entry http://projects.vdr-developer.org/issues/645 this will allow to create a pure 'guest' only user account. The fix was suggested by mhanu in above bug entry. --- pages/recordings.ecpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pages/recordings.ecpp b/pages/recordings.ecpp index 1722514..fd23b63 100644 --- a/pages/recordings.ecpp +++ b/pages/recordings.ecpp @@ -13,6 +13,7 @@ #include "tasks.h" #include "tools.h" #include "i18n.h" +#include "users.h" #include "recman.h" @@ -55,6 +56,8 @@ pageTitle = tr("Recordings"); deleteResult = ""; if (!todel.empty()) { + if (!cUser::CurrentUserHasRightTo(UR_DELRECS)) + throw HtmlError( tr("Sorry, no permission. Please contact your administrator!") ); deletions.push_back(todel); } for (deletions_type::const_iterator it = deletions.begin(); it != deletions.end(); ++it) { -- cgit v1.2.3