Conditions | 3 |
Paths | 3 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
14 | public function authorize() |
||
15 | { |
||
16 | if (config('roles.rolesGuiCreateNewPermissionMiddlewareType') == 'role') { |
||
17 | return $this->user()->hasRole(config('roles.rolesGuiCreateNewPermissionsMiddleware')); |
||
18 | } |
||
19 | if (config('roles.rolesGuiCreateNewPermissionMiddlewareType') == 'permissions') { |
||
20 | return $this->user()->hasPermission(config('roles.rolesGuiCreateNewPermissionsMiddleware')); |
||
21 | } |
||
22 | |||
23 | return true; |
||
24 | } |
||
56 |