Fossil SCM

Preserve moderator access to private forum posts in RSS feeds.

vor0nwe 2026-03-08 12:10 rss-content
Commit 4fbde38d59da3859985d31beed830191663d23af660089203f75197b668e11aa
1 file changed +6 -7
+6 -7
--- src/rss.c
+++ src/rss.c
@@ -228,11 +228,11 @@
228228
int rc = 0;
229229
Blob normalized = BLOB_INITIALIZER;
230230
if( pzAltLink ) *pzAltLink = 0;
231231
if( pOut==0 || zEType==0 ) return 0;
232232
if( zEType[0]=='f' ){
233
- if( content_is_private(rid) ) return -1;
233
+ if( content_is_private(rid) && !g.perm.ModForum ) return -1;
234234
pPost = manifest_get(rid, CFTYPE_FORUM, 0);
235235
if( pPost ){
236236
forum_render_to_html(pOut, pPost->zMimetype, pPost->zWiki);
237237
}
238238
}else if( zEType[0]=='e' ){
@@ -481,16 +481,15 @@
481481
}
482482
483483
bHasContent = rss_render_item_html(&contentHtml, &zTechnoteId, rid, zEType,
484484
blob_str(&base), blob_str(&top));
485485
if( bHasContent<0 ){
486
- if( zEType[0]=='f' && !g.perm.ModForum ){
487
- free(zDate);
488
- free(zSuffix);
489
- continue;
490
- }
491
- bHasContent = 0;
486
+ free(zTechnoteId);
487
+ blob_reset(&contentHtml);
488
+ free(zDate);
489
+ free(zSuffix);
490
+ continue;
492491
}
493492
@ <item>
494493
@ <title>%s(zPrefix)%h(zCom)%h(zSuffix)</title>
495494
if( zTechnoteId!=0 ){
496495
@ <link>%s(g.zBaseURL)/info/%s(zTechnoteId)</link>
497496
--- src/rss.c
+++ src/rss.c
@@ -228,11 +228,11 @@
228 int rc = 0;
229 Blob normalized = BLOB_INITIALIZER;
230 if( pzAltLink ) *pzAltLink = 0;
231 if( pOut==0 || zEType==0 ) return 0;
232 if( zEType[0]=='f' ){
233 if( content_is_private(rid) ) return -1;
234 pPost = manifest_get(rid, CFTYPE_FORUM, 0);
235 if( pPost ){
236 forum_render_to_html(pOut, pPost->zMimetype, pPost->zWiki);
237 }
238 }else if( zEType[0]=='e' ){
@@ -481,16 +481,15 @@
481 }
482
483 bHasContent = rss_render_item_html(&contentHtml, &zTechnoteId, rid, zEType,
484 blob_str(&base), blob_str(&top));
485 if( bHasContent<0 ){
486 if( zEType[0]=='f' && !g.perm.ModForum ){
487 free(zDate);
488 free(zSuffix);
489 continue;
490 }
491 bHasContent = 0;
492 }
493 @ <item>
494 @ <title>%s(zPrefix)%h(zCom)%h(zSuffix)</title>
495 if( zTechnoteId!=0 ){
496 @ <link>%s(g.zBaseURL)/info/%s(zTechnoteId)</link>
497
--- src/rss.c
+++ src/rss.c
@@ -228,11 +228,11 @@
228 int rc = 0;
229 Blob normalized = BLOB_INITIALIZER;
230 if( pzAltLink ) *pzAltLink = 0;
231 if( pOut==0 || zEType==0 ) return 0;
232 if( zEType[0]=='f' ){
233 if( content_is_private(rid) && !g.perm.ModForum ) return -1;
234 pPost = manifest_get(rid, CFTYPE_FORUM, 0);
235 if( pPost ){
236 forum_render_to_html(pOut, pPost->zMimetype, pPost->zWiki);
237 }
238 }else if( zEType[0]=='e' ){
@@ -481,16 +481,15 @@
481 }
482
483 bHasContent = rss_render_item_html(&contentHtml, &zTechnoteId, rid, zEType,
484 blob_str(&base), blob_str(&top));
485 if( bHasContent<0 ){
486 free(zTechnoteId);
487 blob_reset(&contentHtml);
488 free(zDate);
489 free(zSuffix);
490 continue;
 
491 }
492 @ <item>
493 @ <title>%s(zPrefix)%h(zCom)%h(zSuffix)</title>
494 if( zTechnoteId!=0 ){
495 @ <link>%s(g.zBaseURL)/info/%s(zTechnoteId)</link>
496

Keyboard Shortcuts

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