Only show Network Admin if the user is a ZC of a network
This commit is contained in:
@@ -79,4 +79,14 @@ class User extends Authenticatable implements MustVerifyEmail
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Is this user a ZC of a domain?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isZC(): bool
|
||||
{
|
||||
return $this->systems->pluck('addresses')->flatten()->where('role',Address::NODE_ZC)->count() > 0;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user