/** * Checks if the user is user 1 and grants access if so. * * @param \Drupal\Core\Session\AccountInterface $account * The current user account. * * @return \Drupal\Core\Access\AccessResult * The access result. */ public function checkAccess(AccountInterface $account) { // The access result is uncacheable because it is just limiting access to // the migrate UI which is not worth caching. return AccessResultAllowed::allowedIf((int) $account->id() === 1)->mergeCacheMaxAge(0); }