instances added god may help
This commit is contained in:
22
lib/Service/Auth/AuthPermissionGateway.php
Normal file
22
lib/Service/Auth/AuthPermissionGateway.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace MintyPHP\Service\Auth;
|
||||
|
||||
use MintyPHP\Service\Access\PermissionGateway;
|
||||
|
||||
class AuthPermissionGateway
|
||||
{
|
||||
public function __construct(private readonly PermissionGateway $permissionGateway)
|
||||
{
|
||||
}
|
||||
|
||||
public function warmUserPermissions(int $userId, bool $forceRefresh = true): array
|
||||
{
|
||||
return $this->permissionGateway->getUserPermissions($userId, $forceRefresh);
|
||||
}
|
||||
|
||||
public function userHas(int $userId, string $permissionKey): bool
|
||||
{
|
||||
return $this->permissionGateway->userHas($userId, $permissionKey);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user