Skip to content

Commit ff997f7

Browse files
committed
Disable edit and delete for non-commenters
The frontend supported the project maintainers to be able to edit and delete any comments on their projects as a form of moderation (similar to GitHub's behavior). Currently the backend does not support this and the buttons don't work, so for now disable them until we're ready to support moderation in full.
1 parent 529d434 commit ff997f7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/UnisonShare/Timeline/CommentEvent.elm

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,15 @@ type CommentEventActions msg
9898

9999

100100
commentEventActions : AppContext -> ActionMsgs msg -> ProjectRef -> UserHandle -> CommentEventActions msg
101-
commentEventActions appContext msgs projectRef commenterHandle =
101+
commentEventActions appContext msgs _ commenterHandle =
102102
let
103103
isCommentOwner =
104104
Session.isHandle commenterHandle appContext.session
105105

106106
canEditAndDelete =
107-
Session.hasProjectAccess projectRef appContext.session || isCommentOwner
107+
-- TODO: Re-enable to support moderation
108+
-- Session.hasProjectAccess projectRef appContext.session || isCommentOwner
109+
isCommentOwner
108110
in
109111
if canEditAndDelete then
110112
CanModify msgs

0 commit comments

Comments
 (0)