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