MDL-62544 privacy: Allow data requests on behalf of a user by admin/DPO

This commit is contained in:
Jan Dageförde 2018-05-24 16:15:09 +02:00
parent 6b2e04676a
commit 97009b73cf
No known key found for this signature in database
GPG Key ID: 2239CFA64B5E4FCC

View File

@ -53,7 +53,8 @@ if ($manage) {
$PAGE->set_context($context);
// If contactdataprotectionofficer is disabled, send the user back to the profile page, or the privacy policy page.
if (!\tool_dataprivacy\api::can_contact_dpo()) {
// That is, unless you have sufficient capabilities to perform this on behalf of a user.
if (!$manage && !\tool_dataprivacy\api::can_contact_dpo()) {
redirect($returnurl, get_string('contactdpoviaprivacypolicy', 'tool_dataprivacy'), \core\output\notification::NOTIFY_ERROR);
}