Skip to content

Commit c52b2f8

Browse files
authored
Merge pull request #28 from inmanturbo/master
Assign Role instead of Sync
2 parents 2757db3 + b564d4d commit c52b2f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Http/Middleware/HasCrmAccess.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function handle($request, Closure $next)
2424
}
2525

2626
if (config('laravel-crm.crm_owner') == auth()->user()->email && (! auth()->user()->hasRole('Owner') || ! auth()->user()->hasCrmAccess())) {
27-
auth()->user()->syncRoles(['Owner']);
27+
auth()->user()->assignRole('Owner');
2828

2929
auth()->user()->forceFill([
3030
'crm_access' => 1,

0 commit comments

Comments
 (0)