Skip to content

Commit

Permalink
If deleting multiple recordings the user right are checked now.
Browse files Browse the repository at this point in the history
This problem and a patch solving this was reported in bug entry #1317.
  • Loading branch information
Dieter Hametner committed Apr 4, 2013
1 parent c8a125a commit 7d29dbb
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions pages/recordings.ecpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit 7d29dbb

Please sign in to comment.