-
-
Notifications
You must be signed in to change notification settings - Fork 612
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
We have users with different roles, on the same document we can have users that can write / read comments (admin / owner / editor etc...), and users with role that are not allowed to see the comments.
Depend these roles, we init or not comments:
BlockNote/examples/07-collaboration/04-comments/src/App.tsx
Lines 78 to 80 in c3422c2
comments: { | |
threadStore, | |
}, |
By doing like that, if a user has the comments feature and another user does not have it, the line disappear.
Test.Comments.-.Docs.webm
ThreadStoreAuth
does not provide a way to block user to see comment:
export abstract class ThreadStoreAuth { | |
abstract canCreateThread(): boolean; | |
abstract canAddComment(thread: ThreadData): boolean; | |
abstract canUpdateComment(comment: CommentData): boolean; | |
abstract canDeleteComment(comment: CommentData): boolean; | |
abstract canDeleteThread(thread: ThreadData): boolean; | |
abstract canResolveThread(thread: ThreadData): boolean; | |
abstract canUnresolveThread(thread: ThreadData): boolean; | |
abstract canAddReaction(comment: CommentData, emoji?: string): boolean; | |
abstract canDeleteReaction(comment: CommentData, emoji?: string): boolean; | |
} |
In our case, we will not want to see the "mark" neither on the text if the user is not allowed to see comments.
Misc
- Browser: Any browser
- I'm a sponsor and would appreciate if you could look into this sooner than later 💖
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working