From b564d4df5304ec58614478b8790c2b4be24d48a8 Mon Sep 17 00:00:00 2001 From: inmanturbo <47095624+inmanturbo@users.noreply.github.com> Date: Mon, 12 Jul 2021 17:28:51 -0400 Subject: [PATCH] Update HasCrmAccess.php --- src/Http/Middleware/HasCrmAccess.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Http/Middleware/HasCrmAccess.php b/src/Http/Middleware/HasCrmAccess.php index 9cdc9454..1a488c7f 100644 --- a/src/Http/Middleware/HasCrmAccess.php +++ b/src/Http/Middleware/HasCrmAccess.php @@ -24,7 +24,7 @@ public function handle($request, Closure $next) } if (config('laravel-crm.crm_owner') == auth()->user()->email && (! auth()->user()->hasRole('Owner') || ! auth()->user()->hasCrmAccess())) { - auth()->user()->syncRoles(['Owner']); + auth()->user()->assignRole('Owner'); auth()->user()->forceFill([ 'crm_access' => 1,