[Mailman-Users] Modifying Privacy.py

Mark Sapiro mark at msapiro.net
Sun Feb 28 18:55:41 EST 2016

On 02/28/2016 03:23 PM, ListGnome ProtonMail wrote:
> Thanks Mark,
> That worked, with one little "gotcha". I found that after editing
> Privacy.py, I had to go to the admin page of the list and although the
> Privacy option was showing "Requires approval" - until I re-submitted
> the Privay Options page it would operate as if it were set on "Confirm".

Which raises another point. I forgot to mention about the display of the
current value which is now wrong.

Your current two choices actually correspond to values of the
subscribe_policy attribute of 2 and 3, but in the HTML, the checked
attribute will apply to values of 1 and 2.

You also need to edit Mailman/Cgi/admin.py around line 672, change
        if varname == 'subscribe_policy' and not
            checked = checked - 1


        if varname == 'subscribe_policy' and not
            checked = checked - 2

Also note that if you were dealing with an other attribute and not the
one that already had this kludgey code to handle 3 vs 4 choices, it
would be even messier.

Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

More information about the Mailman-Users mailing list