On Thu, Dec 17, 2020, at 6:12 PM, Andreas Barth wrote:
Hi together,
a user was mass-subscribed (with a wrong name) and now registered and changed his name via the web interface but the list entry is not changed.
On looking further at that, I got to the following json outputs:
curl -urest:pass http://localhost:8001/3.0/addresses/user@example.com/user { "created_on": "2020-11-26T15:43:24.928285", "is_server_owner": false, "self_link": "http://localhost:8001/3.0/users/123456", "user_id": 123456 "display_name": "Fixed Name", }
curl -urest:pass http://localhost:8001/3.0/addresses/user@example.com { "email": "user@example.com", "original_email": "user@example.com" "registered_on": "2020-11-26T15:43:24.896405", "self_link": "http://localhost:8001/3.0/addresses/user@example.com", "display_name": "Broken Name", "verified_on": "2020-11-26T15:43:24.965784", "user": "http://localhost:8001/3.0/users/123456" }
Should the fix of the name propagate? Or what would be the appropriate action here?
Address and User (/user endpoint in first output) are separate entries in Mailman and are allowed to have separate names. Until recently, the Addresses' display_name attribute was immutable via REST API, however that has been fixed and will be included in next release of Mailman Core.
You can update the display_name of an address using "mailman shell" for now using the commands in the documentation1
>>> from mailman.interfaces.usermanager import IUserManager
>>> from zope.component import getUtility
>>> user_manager = getUtility(IUserManager)
>>> addr = user_manager.get_address('fperson@example.com')
>>> addr.display_name = "Fixed Name"
>>> commit()
THis should hcnange the name of `fperson@example.com).
-- thanks, Abhilash Raj (maxking)