Say there are two roles, A and B. Role A has "can subscribe to ListA" from access control. Role B has "can subscribe to ListB" from access control.
A user is initially part of Role A and subscribes to ListA. Later the user is moved from Role A to Role B. They can no longer change their subscription status for ListA b/c it is no longer visible on the user_mailman_register screen. (Role B does not have "can subscribe to ListA" access)
One solution to this problem is to automatically unsubscribe users from lists to which they don't have access.

I have a dirty but effective patch that enables this functionality. It involves adding an additional check to the _user_mailman_register_form() function so that a user's automatic unsubscriptions happen when she/he tries to modify their subscriptions. The patch is attached.

CommentFileSizeAuthor
autounsub.patch914 bytesprogram114

Comments

samuelet’s picture

Category: bug » task
Status: Active » Needs review

It makes sense to me, but i'm not sure is the best solution. Check the allowed lists in the user_hook update case could be better.
I'm going to take some time in order to test it.

samuelet’s picture

Version: 5.x-1.3 » 5.x-1.x-dev
Status: Needs review » Fixed

The upcoming HEAD release will contain the patch http://drupal.org/cvs?commit=144637 which solves this issue in the correct way: not when a user change his subscriptions, but when his role is changed.
Thanks Program114 for your patch, it was useful.
Please,open new issues for related bugs.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.