users and institutions route, tests fixed
This commit is contained in:
@@ -38,20 +38,4 @@ class UserRole extends Model implements Auditable
|
||||
{
|
||||
return $this->hasMany(User::class, 'role_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* Ruolo predefinito di sistema: non eliminabile.
|
||||
*/
|
||||
public function isSystemRole(): bool
|
||||
{
|
||||
return in_array($this->name, [self::ADMIN, self::SUPERVISOR, self::USER, self::GUEST], true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Il ruolo è assegnato ad almeno un utente.
|
||||
*/
|
||||
public function isInUse(): bool
|
||||
{
|
||||
return $this->users()->exists();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user