15 Nov
2024
15 Nov
'24
2:38 p.m.
Ah, I must have totally misunderstood then, apologies Mark. So plucking that method here for reference:
def remove_role(self, role, address):
"""Remove a list Member with a specific Role.
:param str role: The role for the new member.
:param str address: A valid email address for the new Member.
"""
url = 'lists/%s/%s/%s' % (
self.fqdn_listname, role, quote_plus(address))
self._connection.call(url, method='DELETE')
Given a list address of announce@bar.com, and a subscriber of andy@bar.com, the API endpoint would be:
'lists/announce.bar.com/moderator/andy@bar.com'
Is that correct? One question, I think I assumed that removing a user from the list would also cascade to remove any roles that user may have had. So we're currently POSTing to lists/announce.bar.com/roster/member
, and I was expecting that to also remove the moderator role. But it sounds like it would require an extra call to explicitly remove them as moderator?