Si el usuario es un global admin se considera que esta en todos los
restaurantes
This commit is contained in:
@@ -44,6 +44,7 @@ class Usuario extends Model {
|
||||
}
|
||||
|
||||
public function isOnRestaurante($restaurante) {
|
||||
if($this->isGlobalAdmin()) return true;
|
||||
return $this->restaurantes()->where('id', $restaurante->id)->count() > 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user