summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de>2013-04-04 19:36:56 (GMT)
committerDieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de>2013-04-04 19:36:56 (GMT)
commit7d29dbb12ab16520c66d2fd869b3e5674b0e9068 (patch)
tree0cf0613ad5d47d26591e6fc19f0a4daba30f7554
parentc8a125a7a86ea5621cb14ac6c1a6b6c2135d3a8b (diff)
downloadvdr-plugin-live-7d29dbb12ab16520c66d2fd869b3e5674b0e9068.tar.gz
vdr-plugin-live-7d29dbb12ab16520c66d2fd869b3e5674b0e9068.tar.bz2
If deleting multiple recordings the user right are checked now.
This problem and a patch solving this was reported in bug entry #1317.
-rw-r--r--pages/recordings.ecpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/pages/recordings.ecpp b/pages/recordings.ecpp
index 8bdad66..51018bb 100644
--- a/pages/recordings.ecpp
+++ b/pages/recordings.ecpp
@@ -64,12 +64,17 @@ if (!todel.empty()) {
deletions.push_back(todel);
}
for (deletions_type::const_iterator it = deletions.begin(); it != deletions.end(); ++it) {
- RemoveRecordingTask task(*it);
- LiveTaskManager().Execute(task);
- if (!task.Result())
- deleteResult += string() + tr("ERROR:") + " " + task.Error() + "<br/>";
- else
- deleteResult += string() + tr("Deleted recording:") + " " + StringReplace(task.RecName(), "~", "/") + "<br/>";
+ if (cUser::CurrentUserHasRightTo(UR_DELRECS)) {
+ RemoveRecordingTask task(*it);
+ LiveTaskManager().Execute(task);
+ if (!task.Result())
+ deleteResult += string() + tr("ERROR:") + " " + task.Error() + "<br/>";
+ else
+ deleteResult += string() + tr("Deleted recording:") + " " + StringReplace(task.RecName(), "~", "/") + "<br/>";
+ }
+ else {
+ throw HtmlError( tr("Sorry, no permission. Please contact your administrator!") );
+ }
}
deletions.clear();