File tree Expand file tree Collapse file tree 3 files changed +21
-3
lines changed
Expand file tree Collapse file tree 3 files changed +21
-3
lines changed Original file line number Diff line number Diff line change @@ -188,7 +188,13 @@ const canDelete = computed(() => {
188188 return user ?.id === props .comment .user_id || store .hasPermission (' manage-discussions' , props .game ) || props .canEditAll || props .canDeleteAll ;
189189});
190190
191- const canReply = computed (() => props .canComment && ! props .comment .user ?.blocked_me );
191+ const canReply = computed (() => {
192+ if (! props .canComment ) {
193+ return false ;
194+ }
195+
196+ return props .canEditResource || ! props .comment .user ?.blocked_me ;
197+ });
192198
193199const classes = computed (() => {
194200 const focus = (focusComment .value && parseInt (focusComment .value ) === props .comment .id ) || (props .currentFocus && props .currentFocus .id === props .comment .id );
Original file line number Diff line number Diff line change @@ -80,7 +80,14 @@ const { mod } = defineProps<{
8080const showReportModal = ref (false );
8181const canEdit = computed (() => canEditMod (mod ));
8282const canDeleteComments = computed (() => canEdit .value && store .hasPermission (' delete-own-mod-comments' , mod .game ));
83- const canComment = computed (() => ! mod .user ?.blocked_me && ! store .isBanned && (! mod .comments_disabled || canEdit .value ));
83+ const canComment = computed (() => {
84+ if (canEdit .value ) {
85+ return true ;
86+ }
87+
88+ return ! mod .user ?.blocked_me && ! store .isBanned && ! mod .comments_disabled ;
89+ });
90+
8491const cannotCommentReason = computed (() => {
8592 if (mod .comments_disabled ) {
8693 return t (' comments_disabled' );
Original file line number Diff line number Diff line change @@ -90,10 +90,15 @@ const bannedCommenting = computed(() => {
9090});
9191
9292const canComment = computed (() => {
93+ if (canModerate .value ) {
94+ return true ;
95+ }
96+
9397 if (bannedCommenting .value || thread .user ?.blocked_me ) {
9498 return false ;
9599 }
96- return ! thread .locked || canModerate .value || (thread .user_id === user ?.id && ! thread .locked_by_mod );
100+
101+ return ! thread .locked || (thread .user_id === user ?.id && ! thread .locked_by_mod );
97102});
98103
99104const cannotCommentReason = computed (() => {
You can’t perform that action at this time.
0 commit comments