bounswe / bounswe2024group11

The proof of work and the product from the 2024G11
https://bounswe.github.io/bounswe2024group11/
11 stars 1 forks source link

Add authorization rules and unique constraints for Like, Bookmark, and Follow ViewSets #457

Open Meminseeker opened 3 months ago

Meminseeker commented 3 months ago

🧱 Description

There are some endpoints that should be reachable by unauthenticated users, while some are should be accessible by only authenticated users. For the latter, being authenticated user is not sufficient to make a certain action. The user should own the related entity.

E.g., A user can delete a post if and only if he is the owner of the post. Any user can search through the posts.

Implement a proper permission policy for the Like, bookmark, and Foolow ViewSets.

📋 Acceptance Criteria