Skip to content

Commit

Permalink
feat: решены задачи раздела Auth
Browse files Browse the repository at this point in the history
  • Loading branch information
shevelev-anatoliy committed Aug 8, 2024
1 parent 5fcab65 commit ab19c6a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/Policies/ItemPolicy.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ public function view(User $user, Item $item)
public function create(User $user)
{
// TODO Auth Задание: Разрешить добавление продуктов только пользователю с id = 10
if ($user->id !== 10) {
return false;
}

return true;
}
Expand Down

0 comments on commit ab19c6a

Please sign in to comment.