Only show Network Admin if the user is a ZC of a network
This commit is contained in:
parent
c4169248ff
commit
eca9f257eb
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -11,6 +11,7 @@
|
||||
</dl>
|
||||
|
||||
@auth
|
||||
@if ($user->isZC())
|
||||
<dl>
|
||||
<dt>Network Admin</dt>
|
||||
<dd><a href="{{ url('ftn/domain') }}">Domains</a></dd>
|
||||
@ -24,6 +25,7 @@
|
||||
<dt>System Admin</dt>
|
||||
<dd><a href="{{ url('ftn/our_systems') }}">This Host Systems</a></dd>
|
||||
</dl>
|
||||
@endif
|
||||
|
||||
@can('admin')
|
||||
<dl>
|
||||
|
Loading…
Reference in New Issue
Block a user