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.
| Comment | File | Size | Author |
|---|---|---|---|
| autounsub.patch | 914 bytes | program114 |
Comments
Comment #1
samuelet commentedIt 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.
Comment #2
samuelet commentedThe 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.
Comment #3
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.