Skip to content
Snippets Groups Projects

Issue #3523408: add bypass permission

2 files
+ 4
1
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -40,7 +40,7 @@ class ServicesAccessCheck implements AccessInterface {
* The access result.
*/
public function access(AccountInterface $account): AccessResultInterface {
return AccessResult::allowedIf($this->restrictIpService->requestAffected() && !$this->restrictIpService->userIpIsRestricted($account));
return AccessResult::allowedIf(($this->restrictIpService->requestAffected() && !$this->restrictIpService->userIpIsRestricted($account)) || $account->hasPermission('bypass restrict route by ip'));
}
}
Loading