Fossil Forum

I can see unapproved posts?
Login

I can see unapproved posts?

I can see unapproved posts?

(1) By Warren Young (wyetr) on 2018-08-01 21:09:10 [link] [source]

Shortly after submitting my most recent post, I opened a different browser that had no login cookie for this repo and saw that it was already visible. Is that the intent? Since the post didn't (at that time) show an Edit button, my understanding is that it hadn't yet been approved by the moderator.

Unless such posts are hidden from other users until they're approved, don't we still have a potential way for spammers to shove their...um, content in front of us?

(2.1) By Dan Barbarito (danbarbarito) on 2018-08-02 01:01:49 edited from 2.0 in reply to 1 [link] [source]

I was just about to create this thread myself. This has to be a bug.

(3) By JohnQSmith on 2018-08-02 01:14:56 in reply to 2.1 [link] [source]

I agree, unless there's some setting that is applied to a user that says "future posts for this user don't need to be moderated".

(5) By Warren Young (wyoung) on 2018-08-09 06:23:58 in reply to 3 [link] [source]

There is such a setting — capability 4 in Admin → Users, "WriteTrusted Forum" — but I'm pretty sure I don't have it.

(4) By Richard Hipp (drh) on 2018-08-02 01:15:03 in reply to 1 [source]

I suppose you could call this a mild kind of bug. Perhaps an "inaccuracy" rather than an "error". I'll add it to my ever-growing list of things to address.

(6) By Warren Young (wyoung) on 2018-08-16 07:10:38 in reply to 4 [link] [source]

I'll add it to my ever-growing list of things to address.

I've checked in a fix for this as branch hide-post-if-needmod for your approval. It works here in tests, but it feels like the sort of thing that should pass under the eyes of someone more experienced with the code base before going to trunk.

I'm concerned about a few things:

  1. It makes the main forum page heavier, since it involves nested queries now. Does it matter? Can you rework the SQL to pull it all in a single pass instead?

  2. Does it work for anonymous users? (Didn't test.)

You might want to move the fpid column to the front of the query. I put it at the end just to keep the size of the diff small.

(7) By Richard Hipp (drh) on 2018-08-16 17:22:59 in reply to 1 [link] [source]

In the latest trunk version of Fossil (now up on the website) the text of forum posts that are awaiting moderation is omitted for readers who do not have moderator privilege and who are not the original author of the post. Instead, the post simply says "Awaiting Moderator Approval".

Similarly, the /forum page omits all unmoderated posts from consideration when it is displaying the various threads, unless the viewer has forum moderator privileges. Unlike the display of individual posts, on the /forum page, even posts from the same user are excluded if they are unmoderated.