Skip to content

Conversation

lunika
Copy link
Member

@lunika lunika commented Aug 28, 2025

Purpose

Describe in #156 this PR add the comment feature in the backend application.

A user, authenticated or not, depending on the link_reach and link_role configuration, can add one or more comment to a Document.
A new role and link_role commentator are also added. This role is higher than reader but lower than editor.
If the link_reach is public and the link_role is commentator, then anonymous user can leave a comment.

Missing:

  • Compatilibility check with what blocknote is expected.
  • Is it the back or the front that is managing comment reply ?
  • What other properties than content is expected ?

Proposal

  • ✨(backend) add comment viewset
  • ✨(backend) add Comment model
  • ✨(backend) add commentator role

lunika added 3 commits August 26, 2025 17:55
To allow a user to comment a document we added a new role: commentator.
Commentator is higher than reader but lower than editor.
In order to store the comments on a document, we created a new model
Comment. User is nullable because anonymous users can comment a Document
is this one is public with a link_role commentator.
This commit add the CRUD part to manage comment lifeycle. Permissions
are relying on the Document and Comment abilities. Comment viewset
depends on the Document route and is added to the
document_related_router. Dedicated serializer and permission are
created.
@lunika lunika requested review from sampaccoud and AntoLC August 28, 2025 06:33
@lunika lunika self-assigned this Aug 28, 2025
@lunika lunika added the feature add a new feature label Aug 28, 2025
@lunika lunika marked this pull request as draft August 28, 2025 06:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature add a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant