[Zope-CMF] Allow Manager to edit properties of other users
Tom Cameron
tomcameron@optusnet.com.au
Sun, 1 Dec 2002 21:35:11 +1000
I am building a CMF site using skins. I am using the memberdata tool to
store lots of properties about members.
I want the Manager of the site to be able to modify other users properties
but when I try to call the setMemberProperties() it does not work because
that method is declared Private.
This is the script I wrote, I pass the memberid in the request along with
all the new property values....
---
REQUEST=context.REQUEST
memberid = REQUEST['memberid']
member = context.portal_membership.getMemberById(memberid)
failMessage = context.portal_registration.testPropertiesValidity(REQUEST,
member)
if failMessage:
REQUEST.set('portal_status_message', failMessage)
return context.member_edit(context, REQUEST)
member.setMemberProperties(REQUEST)
REQUEST.set('portal_status_message', 'details updated')
return context.member_edit(context, REQUEST)
---
So, how do I allow the Manager to edit another member's properties? I dont
want to have to hack the CMF code itself and I was hoping to keep all my
code in the skins for ease.
Thanks
Tom