MDL-64030 tool_dataprivacy: Process requests when system purpose not set

This commit is contained in:
Andrew Nicols
2018-11-23 07:54:22 +08:00
parent 0225ad42ea
commit 26ce2c0a81
5 changed files with 54 additions and 5 deletions
@@ -74,11 +74,9 @@ class process_data_request_task extends adhoc_task {
return;
}
// If no site purpose is defined, reject requests since they cannot be processed.
if (!\tool_dataprivacy\data_registry::defaults_set()) {
api::update_request_status($requestid, api::DATAREQUEST_STATUS_REJECTED);
mtrace('No site purpose defined. Request ' . $requestid . ' rejected.');
return;
// Warn if no site purpose is defined.
mtrace('Warning: No purpose is defined at the system level. Deletion will delete all.');
}
// Grab the manager.