mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-11 01:33:11 +08:00
Fixed wrong domains getting resolved for an API key roles
This commit is contained in:
committed by
Alejandro Celaya
parent
192308a6a3
commit
4ef5ab7a90
@@ -119,6 +119,11 @@ class ApiKey extends AbstractEntity
|
||||
return $role?->meta() ?? [];
|
||||
}
|
||||
|
||||
/**
|
||||
* @template T
|
||||
* @param callable(string $roleName, array $meta): T $fun
|
||||
* @return T[]
|
||||
*/
|
||||
public function mapRoles(callable $fun): array
|
||||
{
|
||||
return $this->roles->map(fn (ApiKeyRole $role) => $fun($role->name(), $role->meta()))->getValues();
|
||||
|
||||
Reference in New Issue
Block a user