| Total Complexity | 7 |
| Total Lines | 68 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | class ImportPolicy |
||
| 11 | { |
||
| 12 | use HandlesAuthorization; |
||
| 13 | |||
| 14 | public function before($user) |
||
| 18 | } |
||
| 19 | } |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Determine whether the user can view the import. |
||
| 23 | * |
||
| 24 | * @param User $user |
||
| 25 | * @param \App\Models\Import $import |
||
| 26 | * @return mixed |
||
| 27 | */ |
||
| 28 | public function view(User $user, Import $import) |
||
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Determine whether the user can update the project. |
||
| 35 | * |
||
| 36 | * @param User $user |
||
| 37 | * @param Project $project |
||
| 38 | * |
||
| 39 | * @return mixed |
||
| 40 | */ |
||
| 41 | public function importProject(User $user, Project $project) |
||
| 44 | } |
||
| 45 | |||
| 46 | /** |
||
| 47 | * Determine whether the user can create imports. |
||
| 48 | * |
||
| 49 | * @param User $user |
||
| 50 | * @return mixed |
||
| 51 | */ |
||
| 52 | public function create(User $user, Project $project) |
||
| 53 | { |
||
| 54 | return (bool) $user->isAdminForProjectId($project->id); |
||
| 55 | } |
||
| 56 | |||
| 57 | /** |
||
| 58 | * Determine whether the user can update the import. |
||
| 59 | * |
||
| 60 | * @param User $user |
||
| 61 | * @param \App\Models\Import $import |
||
| 62 | * @return mixed |
||
| 63 | */ |
||
| 64 | public function update(User $user, Import $import) |
||
| 66 | // |
||
| 67 | } |
||
| 68 | |||
| 69 | /** |
||
| 70 | * Determine whether the user can delete the import. |
||
| 71 | * |
||
| 72 | * @param User $user |
||
| 73 | * @param \App\Models\Import $import |
||
| 74 | * @return mixed |
||
| 75 | */ |
||
| 76 | public function delete(User $user, Import $import) |
||
| 78 | // |
||
| 79 | } |
||
| 81 |