tao-test/app/tao/models/classes/resources/ValidatePermissionsCacheKeyFactory.php

17 lines
390 B
PHP
Raw Normal View History

2022-08-29 20:14:13 +02:00
<?php
declare(strict_types=1);
namespace oat\tao\model\resources;
use oat\oatbox\service\ConfigurableService;
use oat\oatbox\user\User;
class ValidatePermissionsCacheKeyFactory extends ConfigurableService
{
public function create(string $resource, User $user): string
{
return sprintf('validperm:%s:%s', urlencode($user->getIdentifier()), urlencode($resource));
}
}