Skip to content

Commit

Permalink
Merge pull request #28 from inmanturbo/master
Browse files Browse the repository at this point in the history
Assign Role instead of Sync
  • Loading branch information
andrewdrake authored Jul 13, 2021
2 parents 2757db3 + b564d4d commit c52b2f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Http/Middleware/HasCrmAccess.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit c52b2f8

Please # to comment.