Total Complexity | 5 |
Total Lines | 43 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | class CustomerNotePolicy |
||
11 | { |
||
12 | use HandlesAuthorization; |
||
13 | use AllowTrait; |
||
1 ignored issue
–
show
|
|||
14 | |||
15 | /** |
||
16 | * Determine if the user can create a new note |
||
17 | */ |
||
18 | public function create(User $user) |
||
19 | { |
||
20 | return $this->checkPermission($user, 'Add Customer Note'); |
||
21 | } |
||
22 | |||
23 | /** |
||
24 | * Determine if the user can update an existing note |
||
25 | */ |
||
26 | public function update(User $user) |
||
27 | { |
||
28 | return $this->checkPermission($user, 'Edit Customer Note'); |
||
29 | } |
||
30 | |||
31 | /** |
||
32 | * Determine if the user can soft delete a note |
||
33 | */ |
||
34 | public function delete(User $user) |
||
35 | { |
||
36 | return $this->checkPermission($user, 'Delete Customer Note'); |
||
37 | } |
||
38 | |||
39 | /** |
||
40 | * Determine if the user can restore a deleted note |
||
41 | */ |
||
42 | public function restore(User $user) |
||
45 | } |
||
46 | |||
47 | /** |
||
48 | * Determine if the user can permanently delete a note |
||
49 | */ |
||
50 | public function forceDelete(User $user) |
||
55 |