Created a 'zc' role to be used when a user is a ZC of a domain, or a site admin
This commit is contained in:
@@ -27,8 +27,10 @@ class AuthServiceProvider extends ServiceProvider
|
||||
{
|
||||
$this->registerPolicies();
|
||||
|
||||
Gate::define('admin',function (User $o) {
|
||||
return $o->admin === TRUE;
|
||||
});
|
||||
// Mailer Admin
|
||||
Gate::define('admin',fn(User $o)=>($o->admin === TRUE));
|
||||
|
||||
// ZC of a Zone
|
||||
Gate::define('zc',fn(User $o)=>(($o->admin === TRUE) || $o->ZC()));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user