Fossil SCM
The "New Thread" button in /forum is no longer ristricted to those with forum write capability: if you lack it, we now send you to the login page instead. Without this, users without the capability to post are left looking in through the window of a building without obvious doors. This change pairs especially nicely with the self-registration feature, but it doesn't require it, since /login also allows anonymous login, which should be enabled for Fossil forums on sites where non-users are expected to visit.
Commit
cdb7f3b988da4624979ae5e56a509f33d38bd0493bf75919b859a5f718f6b950
Parent
4af31f11bb6473f…
1 file changed
+3
-3
+3
-3
| --- src/forum.c | ||
| +++ src/forum.c | ||
| @@ -971,13 +971,13 @@ | ||
| 971 | 971 | if( !g.perm.RdForum ){ |
| 972 | 972 | login_needed(g.anon.RdForum); |
| 973 | 973 | return; |
| 974 | 974 | } |
| 975 | 975 | style_header("Forum"); |
| 976 | - if( g.perm.WrForum ){ | |
| 977 | - style_submenu_element("New Thread","%R/forumnew"); | |
| 978 | - } | |
| 976 | + style_submenu_element("New Thread", g.perm.WrForum ? | |
| 977 | + "%R/forumnew" : | |
| 978 | + "%R/login"); | |
| 979 | 979 | if( g.perm.ModForum && moderation_needed() ){ |
| 980 | 980 | style_submenu_element("Moderation Requests", "%R/modreq"); |
| 981 | 981 | } |
| 982 | 982 | if( (srchFlags & SRCH_FORUM)!=0 ){ |
| 983 | 983 | if( search_screen(SRCH_FORUM, 0) ){ |
| 984 | 984 |
| --- src/forum.c | |
| +++ src/forum.c | |
| @@ -971,13 +971,13 @@ | |
| 971 | if( !g.perm.RdForum ){ |
| 972 | login_needed(g.anon.RdForum); |
| 973 | return; |
| 974 | } |
| 975 | style_header("Forum"); |
| 976 | if( g.perm.WrForum ){ |
| 977 | style_submenu_element("New Thread","%R/forumnew"); |
| 978 | } |
| 979 | if( g.perm.ModForum && moderation_needed() ){ |
| 980 | style_submenu_element("Moderation Requests", "%R/modreq"); |
| 981 | } |
| 982 | if( (srchFlags & SRCH_FORUM)!=0 ){ |
| 983 | if( search_screen(SRCH_FORUM, 0) ){ |
| 984 |
| --- src/forum.c | |
| +++ src/forum.c | |
| @@ -971,13 +971,13 @@ | |
| 971 | if( !g.perm.RdForum ){ |
| 972 | login_needed(g.anon.RdForum); |
| 973 | return; |
| 974 | } |
| 975 | style_header("Forum"); |
| 976 | style_submenu_element("New Thread", g.perm.WrForum ? |
| 977 | "%R/forumnew" : |
| 978 | "%R/login"); |
| 979 | if( g.perm.ModForum && moderation_needed() ){ |
| 980 | style_submenu_element("Moderation Requests", "%R/modreq"); |
| 981 | } |
| 982 | if( (srchFlags & SRCH_FORUM)!=0 ){ |
| 983 | if( search_screen(SRCH_FORUM, 0) ){ |
| 984 |