Fossil SCM
Do not show the status-change control in the forum if the post is still pending moderation, as setting the status then will tag an artifact which will be deleted if moderation rejects the post.
Commit
449bb3bc6ed37f38d67cb1432f6b708c7563bb4c74f2cb8ccec126c78a5d378a
Parent
b6b08b6d863cb49…
1 file changed
+1
+1
| --- src/forum.c | ||
| +++ src/forum.c | ||
| @@ -865,10 +865,11 @@ | ||
| 865 | 865 | /* |
| 866 | 866 | ** Returns true if the current user is authorized to set forum post |
| 867 | 867 | ** fpid's status. |
| 868 | 868 | */ |
| 869 | 869 | static int forum_may_set_status(int fpid){ |
| 870 | + if( moderation_pending(fpid) ) return 0; | |
| 870 | 871 | return g.perm.Admin |
| 871 | 872 | || g.perm.ModForum |
| 872 | 873 | || (login_is_individual() |
| 873 | 874 | && forumpost_is_owner(fpid, 0)); |
| 874 | 875 | } |
| 875 | 876 |
| --- src/forum.c | |
| +++ src/forum.c | |
| @@ -865,10 +865,11 @@ | |
| 865 | /* |
| 866 | ** Returns true if the current user is authorized to set forum post |
| 867 | ** fpid's status. |
| 868 | */ |
| 869 | static int forum_may_set_status(int fpid){ |
| 870 | return g.perm.Admin |
| 871 | || g.perm.ModForum |
| 872 | || (login_is_individual() |
| 873 | && forumpost_is_owner(fpid, 0)); |
| 874 | } |
| 875 |
| --- src/forum.c | |
| +++ src/forum.c | |
| @@ -865,10 +865,11 @@ | |
| 865 | /* |
| 866 | ** Returns true if the current user is authorized to set forum post |
| 867 | ** fpid's status. |
| 868 | */ |
| 869 | static int forum_may_set_status(int fpid){ |
| 870 | if( moderation_pending(fpid) ) return 0; |
| 871 | return g.perm.Admin |
| 872 | || g.perm.ModForum |
| 873 | || (login_is_individual() |
| 874 | && forumpost_is_owner(fpid, 0)); |
| 875 | } |
| 876 |