1 | <?php |
||
21 | class UserPolicy |
||
22 | { |
||
23 | use HandlesAuthorization; |
||
24 | |||
25 | /** |
||
26 | * Determine whether the user can view the user. |
||
27 | * |
||
28 | * @param \Rinvex\Fort\Models\User $user |
||
29 | * @param \Rinvex\Fort\Models\User $model |
||
30 | * |
||
31 | * @return bool |
||
32 | */ |
||
33 | public function view(User $user, User $model) |
||
37 | |||
38 | /** |
||
39 | * Determine whether the user can create users. |
||
40 | * |
||
41 | * @param \Rinvex\Fort\Models\User $user |
||
42 | * |
||
43 | * @return bool |
||
44 | */ |
||
45 | public function create(User $user) |
||
49 | |||
50 | /** |
||
51 | * Determine whether the user can update the user. |
||
52 | * |
||
53 | * @param \Rinvex\Fort\Models\User $user |
||
54 | * @param \Rinvex\Fort\Models\User $model |
||
55 | * |
||
56 | * @return bool |
||
57 | */ |
||
58 | public function update(User $user, User $model) |
||
63 | |||
64 | /** |
||
65 | * Determine whether the user can delete the user. |
||
66 | * |
||
67 | * @param \Rinvex\Fort\Models\User $user |
||
68 | * @param \Rinvex\Fort\Models\User $model |
||
69 | * |
||
70 | * @return bool |
||
71 | */ |
||
72 | public function delete(User $user, User $model) |
||
77 | |||
78 | /** |
||
79 | * Determine whether the user can import the users. |
||
80 | * |
||
81 | * @param \Rinvex\Fort\Models\User $user |
||
82 | * |
||
83 | * @return bool |
||
84 | */ |
||
85 | public function import(User $user) |
||
89 | |||
90 | /** |
||
91 | * Determine whether the user can export the users. |
||
92 | * |
||
93 | * @param \Rinvex\Fort\Models\User $user |
||
94 | * |
||
95 | * @return bool |
||
96 | */ |
||
97 | public function export(User $user) |
||
101 | |||
102 | /** |
||
103 | * Determine whether the user can activate the user. |
||
104 | * |
||
105 | * @param \Rinvex\Fort\Models\User $user |
||
106 | * @param \Rinvex\Fort\Models\Ability $model |
||
107 | * |
||
108 | * @return bool |
||
109 | */ |
||
110 | public function activate(User $user, User $model) |
||
116 | |||
117 | /** |
||
118 | * Determine whether the user can deactivate the user. |
||
119 | * |
||
120 | * @param \Rinvex\Fort\Models\User $user |
||
121 | * @param \Rinvex\Fort\Models\Ability $model |
||
122 | * |
||
123 | * @return bool |
||
124 | */ |
||
125 | public function deactivate(User $user, User $model) |
||
131 | } |
||
132 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.