diff --git a/app/Http/Controllers/SystemController.php b/app/Http/Controllers/SystemController.php index 1c31ff7..01bd09c 100644 --- a/app/Http/Controllers/SystemController.php +++ b/app/Http/Controllers/SystemController.php @@ -244,7 +244,7 @@ class SystemController extends Controller public function add_session(Request $request,System $o) { // @todo This should be admin of the zone - $this->authorize('admin',$o); + $this->authorize('update',$o); session()->flash('accordion','session'); $validate = $request->validate([ diff --git a/resources/views/system/form-session.blade.php b/resources/views/system/form-session.blade.php index 9e1a202..98f60f9 100644 --- a/resources/views/system/form-session.blade.php +++ b/resources/views/system/form-session.blade.php @@ -1,3 +1,4 @@ + @if(($x=\App\Models\Zone::active() ->whereIn('id',$o->zones->pluck('id')) ->whereNotIn('id',$o->sessions->pluck('id')) @@ -42,7 +43,7 @@