mirror of
https://github.com/shlinkio/shlink.git
synced 2026-07-29 15:53:46 -05:00
Fixed usage of enum where the enum's value should be used
This commit is contained in:
@@ -148,7 +148,7 @@ class ApiKey extends AbstractEntity
|
|||||||
|
|
||||||
if ($this->hasRole($role)) {
|
if ($this->hasRole($role)) {
|
||||||
/** @var ApiKeyRole $apiKeyRole */
|
/** @var ApiKeyRole $apiKeyRole */
|
||||||
$apiKeyRole = $this->roles->get($role);
|
$apiKeyRole = $this->roles->get($role->value);
|
||||||
$apiKeyRole->updateMeta($meta);
|
$apiKeyRole->updateMeta($meta);
|
||||||
} else {
|
} else {
|
||||||
$apiKeyRole = new ApiKeyRole($roleDefinition->role, $roleDefinition->meta, $this);
|
$apiKeyRole = new ApiKeyRole($roleDefinition->role, $roleDefinition->meta, $this);
|
||||||
|
|||||||
Reference in New Issue
Block a user