1 | <?php |
||
14 | class AuthServiceProvider extends ServiceProvider |
||
15 | { |
||
16 | /** |
||
17 | * The policy mappings for the application. |
||
18 | * |
||
19 | * @var array |
||
20 | */ |
||
21 | protected $policies = [ |
||
22 | 'SET\Model' => 'SET\Policies\ModelPolicy', |
||
23 | ]; |
||
24 | |||
25 | /** |
||
26 | * @param GateContract $gate |
||
27 | */ |
||
28 | public function boot(GateContract $gate) |
||
71 | |||
72 | /** |
||
73 | * Register the application services. |
||
74 | * |
||
75 | * @return void |
||
76 | */ |
||
77 | public function register() |
||
81 | |||
82 | /** |
||
83 | * Check if we have defined the user as an admin in their record on in the config file. |
||
84 | * |
||
85 | * @param $user |
||
86 | * |
||
87 | * @return bool |
||
88 | */ |
||
89 | private function isAdmin($user) |
||
93 | |||
94 | /** |
||
95 | * See if we have set the role to view or higher. |
||
96 | * |
||
97 | * @param $user |
||
98 | * |
||
99 | * @return bool |
||
100 | */ |
||
101 | private function isViewer($user) |
||
105 | } |
||
106 |