Upgrade to Laravel 9 (#4413)
Co-authored-by: DaneEveritt <dane@daneeveritt.com>
This commit is contained in:
parent
95e15d2c8a
commit
cbcf62086f
573 changed files with 4387 additions and 9411 deletions
|
@ -37,10 +37,8 @@ class AdminAcl
|
|||
|
||||
/**
|
||||
* Determine if an API key has permission to perform a specific read/write operation.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function can(int $permission, int $action = self::READ)
|
||||
public static function can(int $permission, int $action = self::READ): bool
|
||||
{
|
||||
if ($permission & $action) {
|
||||
return true;
|
||||
|
@ -52,10 +50,8 @@ class AdminAcl
|
|||
/**
|
||||
* Determine if an API Key model has permission to access a given resource
|
||||
* at a specific action level.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function check(ApiKey $key, string $resource, int $action = self::READ)
|
||||
public static function check(ApiKey $key, string $resource, int $action = self::READ): bool
|
||||
{
|
||||
return self::can(data_get($key, self::COLUMN_IDENTIFIER . $resource, self::NONE), $action);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue