public function DataPolicy::agreementAccess in Data Policy 8
Check access to agreement page.
Return value
\Drupal\Core\Access\AccessResultInterface Allow to open page when a user was not give consent on a current version of data policy.
1 string reference to 'DataPolicy::agreementAccess'
File
- src/
Controller/ DataPolicy.php, line 347
Class
- DataPolicy
- Class DataPolicy.
Namespace
Drupal\data_policy\ControllerCode
public function agreementAccess() {
if ($this->dataPolicyConsentManager
->needConsent()) {
return AccessResult::allowed();
}
return AccessResult::forbidden();
}