-
-
Notifications
You must be signed in to change notification settings - Fork 546
Open
Labels
area: backendThis issue involves Python, Django or dependency (eg. database)This issue involves Python, Django or dependency (eg. database)bug
Milestone
Description
It doesn't make sense to be able to like/unlike or edit hidden posts.
Permissions to check:
check_see_thread_post_permissioncheck_see_private_thread_post_permission
To fix, override get_thread_post method on a view accessing post:
class ThreadPostSomethingView:
def get_thread_post(
self, request: HttpRequest, thread: Thread, post_id: int
) -> Post:
post = super().get_thread_post(request, thread, post_id)
check_see_thread_post_permission(
request.user_permissions, post.category, post.thread, post
)
return postReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area: backendThis issue involves Python, Django or dependency (eg. database)This issue involves Python, Django or dependency (eg. database)bug