Fix some forgotten logic checks temporarily
This commit is contained in:
parent
97d87ff57c
commit
131159c246
4 changed files with 4 additions and 4 deletions
|
@ -42,7 +42,7 @@ abstract class AdminFormRequest extends FormRequest
|
|||
return false;
|
||||
}
|
||||
|
||||
return $this->user()->isRootAdmin();
|
||||
return (bool) $this->user()->root_admin;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -202,7 +202,7 @@ class User extends Model implements
|
|||
*/
|
||||
public function isRootAdmin()
|
||||
{
|
||||
return $this->root_admin === 1;
|
||||
return $this->root_admin;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -43,7 +43,7 @@ class APIKeyPolicy
|
|||
protected function checkPermission(User $user, Key $key, $permission)
|
||||
{
|
||||
// Non-administrative users cannot use administrative routes.
|
||||
if (! starts_with($key, 'user.') && ! $user->isRootAdmin()) {
|
||||
if (! starts_with($key, 'user.') && ! $user->root_admin) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ class ServerPolicy
|
|||
*/
|
||||
public function before(User $user, $ability, Server $server)
|
||||
{
|
||||
if ($user->isRootAdmin() || $server->owner_id === $user->id) {
|
||||
if ($user->root_admin || $server->owner_id === $user->id) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue