public static AccessResult::allowedIfHasPermissions(AccountInterface $account, array $permissions, $conjunction = 'AND')
Creates an allowed access result if the permissions are present, neutral otherwise.
Checks the permission and adds a 'user.permissions' cache contexts.
Parameters
\Drupal\Core\Session\AccountInterface $account: The account for which to check permissions.
array $permissions: The permissions to check.
string $conjunction: (optional) 'AND' if all permissions are required, 'OR'