Fossil SCM

Correct permissions check on forum-attachment removal confirmation to account for the forum-close-policy setting.

stephan 2026-05-25 11:38 UTC forum-attachments
Commit cb9e36ecd8c80c553f72fc06b12f8047173b767879275feb2f78d12db120fa5a
1 file changed +1 -1
+1 -1
--- src/attach.c
+++ src/attach.c
@@ -656,11 +656,11 @@
656656
@ <p>The attachment below has been deleted.</p>
657657
fossil_free(zNewDate);
658658
}
659659
660660
if( P("del")
661
- && ((zForumPost && (g.perm.Admin || bUserIsOwner)) ||
661
+ && ((zForumPost && (bUserIsOwner || forumpost_may_close())) ||
662662
(zTktUuid && g.perm.WrTkt) ||
663663
(zWikiName && g.perm.WrWiki) ||
664664
(zTNUuid && g.perm.Write && g.perm.WrWiki))
665665
){
666666
form_begin(0, "%R/ainfo/%!S", zUuid);
667667
--- src/attach.c
+++ src/attach.c
@@ -656,11 +656,11 @@
656 @ <p>The attachment below has been deleted.</p>
657 fossil_free(zNewDate);
658 }
659
660 if( P("del")
661 && ((zForumPost && (g.perm.Admin || bUserIsOwner)) ||
662 (zTktUuid && g.perm.WrTkt) ||
663 (zWikiName && g.perm.WrWiki) ||
664 (zTNUuid && g.perm.Write && g.perm.WrWiki))
665 ){
666 form_begin(0, "%R/ainfo/%!S", zUuid);
667
--- src/attach.c
+++ src/attach.c
@@ -656,11 +656,11 @@
656 @ <p>The attachment below has been deleted.</p>
657 fossil_free(zNewDate);
658 }
659
660 if( P("del")
661 && ((zForumPost && (bUserIsOwner || forumpost_may_close())) ||
662 (zTktUuid && g.perm.WrTkt) ||
663 (zWikiName && g.perm.WrWiki) ||
664 (zTNUuid && g.perm.Write && g.perm.WrWiki))
665 ){
666 form_begin(0, "%R/ainfo/%!S", zUuid);
667

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button