Reg: Postorius Issue 127
Siddhartha Gairola writes:
So this is what we have to implement for postorius - "if the post is from a moderated member, the moderator has a checkbox to clear the member's moderation when accepting the post."
Right.
But I am not too sure how to get this done. I guess it would require modifying some controller. If I could get some assistance on this, I would be grateful.
Postorius is implemented as a Django application, and Django uses a modified MVC model. So you should be prepared for all of model (model), view (template), and controller (view) to be involved (in parens Django terms, outside MVC terms, somewhat stretched as necessary in Django).
Model: since the user's moderation bit is already set, it must be present. Since you're just asked to clear it, which is a normal operation for bits, probably no change to model is needed.
Template: implements checkbox formatting. Needs change.
View: implements checkbox toggling and communication with model. Needs change.
To find template, go to template directory (use find(1) or GUI equivalent on your platform), look through templates to find moderation page(s) (there may be more than one).
To find code, grep through views for one which invokes that template.
Don't promise this will get you what you want, but that's the way I would start.
Gotta do other work now, back tomorrow evening (> 06:00 UTC).
Steve
On 01/07/2017 08:46 AM, Stephen J. Turnbull wrote:
Model: since the user's moderation bit is already set, it must be present. Since you're just asked to clear it, which is a normal operation for bits, probably no change to model is needed.
Template: implements checkbox formatting. Needs change.
View: implements checkbox toggling and communication with model. Needs change.
In MM 3 it's a bit more complicated than that. The member's moderation is actually one of 6 possible values. These are None, hold, reject, discard, accept or defer with respective meanings "use the list's default", "hold for moderator approval", "reject the message", "discard the message", "accept the message immediately without considering other rules" or "continue to other rules in the chain".
The only cases in which we will see a message held because of moderation are when the user's setting is hold or is None when the list default is hold, and probably the only case we want to deal with with a checkbox while approving the held message is switching from None to defer.
The situation that #127 is addressing is the case where the list's default is hold so new member's posts are held, but once a moderator sees an on-topic post from a human member, the moderator can "clear" future holds which means switching the member's moderation to defer.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (2)
-
Mark Sapiro
-
Stephen J. Turnbull