
| Current Path : /var/www/html/rocksensor/web/core/lib/Drupal/Core/Session/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/rocksensor/web/core/lib/Drupal/Core/Session/AccessPolicyBase.php |
<?php
namespace Drupal\Core\Session;
/**
* Base class for access policies.
*/
abstract class AccessPolicyBase implements AccessPolicyInterface {
/**
* {@inheritdoc}
*/
public function applies(string $scope): bool {
return $scope === AccessPolicyInterface::SCOPE_DRUPAL;
}
/**
* {@inheritdoc}
*/
public function calculatePermissions(AccountInterface $account, string $scope): RefinableCalculatedPermissionsInterface {
return (new RefinableCalculatedPermissions())->addCacheContexts($this->getPersistentCacheContexts());
}
/**
* {@inheritdoc}
*/
public function alterPermissions(AccountInterface $account, string $scope, RefinableCalculatedPermissionsInterface $calculated_permissions): void {}
/**
* {@inheritdoc}
*/
public function getPersistentCacheContexts(): array {
return [];
}
}