Chris@0: settings = $settings; Chris@0: } Chris@0: Chris@0: /** Chris@0: * Checks access. Chris@0: * Chris@0: * @return \Drupal\Core\Access\AccessResultInterface Chris@0: * The access result. Chris@0: */ Chris@0: public function access() { Chris@0: // Uncacheable because the access result depends on a Settings key-value Chris@0: // pair, and can therefore change at any time. Chris@0: return AccessResult::allowedIf($this->settings->get('allow_authorize_operations', TRUE))->setCacheMaxAge(0); Chris@0: } Chris@0: Chris@0: }