Skip to content

Commit 75a6541

Browse files
committed
Set a crm owner
1 parent 27cd8fb commit 75a6541

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

config/laravel-crm.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
<?php
22

3-
/*
4-
* You can place your custom package configuration in here.
5-
*/
63
return [
74

5+
'crm_owner' => '',
6+
87
'route_prefix' => 'crm',
98

109
'route_middleware' => ['web'],

src/Http/Middleware/HasCrmAccess.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public function handle($request, Closure $next)
1919
return $next($request);
2020
}
2121

22-
if (auth()->user()->crm_access != 1) {
22+
if (auth()->user()->crm_access != 1 && config('laravel-crm.crm_owner') != auth()->user()->email) {
2323
abort('403');
2424
}
2525

0 commit comments

Comments
 (0)