Ticket #9552 (closed PLIP: wontfix)
Membership UI improvements
Reported by: | dukebody | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | Future |
Component: | General | Version: | |
Keywords: | Cc: |
Description
http://plone.org/products/plone/roadmap/143
Provide a configlet to expose various needed options to ease the work of site administrators. And recode portal_membership.getMemberInfo and the associated UI.
Proposed by
Kamon Ayeva
Seconded by
Maik Roeder
Proposal type
User interface, Architecture
State
being-discussed
Definitions
Definitions == of concepts in Plone 2.5 (i.e. with PlonePAS)
*
Member : TODO
*
Memberdata : TODO
*
Group : TODO
Motivation
Many aspects of Plone are missing their configlet. In particular, because it is part of the things the Administrator needs to think about in the process of setting up his site (or later when maintaining it), "Membership & Memberdata Tools control" is in good position. Assumptions
We will not provide the control panels for managing users and groups. This should have been already provided by PlonePAS integration in Plone 2.5 and forward.
Proposal
This PLIP proposes two main improvements :
- Complete the personal preferences UI by providing a consistent public-facing memberdata view (currently provided by the 'author.pt' template).
- Ease the administrator's work by pushing common membership policy options from ZMI to Plone Control Panel.
Here is a preview screenshot of the configlet (will be updated !):
Implementation
Extend PlonePAS MembershipTool so it returns available data for a given member (in a controled way)
There is already the 'getMemberInfo' method of CMFPlone's portal_membership, but it only returns a fixed set of the memberdata. We propose to re-implement it so it returns the data structure that the administrator chooses (through the configlet).
The code would look like (UPDATE : this is prototype-quality and should change to better use PlonePAS API) ::
security.declarePublic('getMemberInfo') def getMemberInfo(self, memberId=None):
""" Return 'harmless' Memberinfo of any member, such as Full name, Location, etc """ if not memberId:
member = self.getAuthenticatedMember()
else:
member = self.getMemberById(memberId)
if member is None:
return None
membertool = getToolByName(self, 'portal_memberdata', None) propstool = getToolByName(self, 'portal_properties', None)
keys = membertool.propertyIds()
# Getting keys to exclude (from portal_properties/membership_properties) default_excluded = ('portal_skin', 'listed', 'login_time', 'last_login_time', 'error_log_update', \
'language', 'ext_editor', 'wysiwyg_editor', 'visible_ids')
if propstool is not None:
membership_props = getToolByName(propstool, 'membership_properties', None) if membership_props is not None:
not_show_member_info = membership_props.getProperty('not_show_member_info', default_excluded)
else:
not_show_member_info = default_excluded
# Building the memberinfo dict memberinfo = {} for key in keys:
if key in not_show_member_info:
continue
memberinfo[key] = member.getProperty(key)
return memberinfo
Update author.pt using the new getMemberInfo
We could take this opportunity to change the name of 'author.pt' to 'member.pt', since this template is usefull to present the information of any member, not only authors. Provide a configlet with all options usefull for the site administrator
Options we would expose are :
- Allow "Anonymous User" to join
- Create member folders / Do not create member folders
- Content Type of member folder objects (if creation enabled)
- Selection of memberdata keys to use/exclude (in member/author.pt)
Deliverables
- Configuration files and code needed for :
- The new membership configlet.
- The template 'member.pt' (to replace 'author.pt').
- The modified MembershipTool.py (PlonePAS).
- Unit tests and migration code.
PLEASE READ THIS AND RE-OPEN VALID PLIPS!
As we launch the new PLIP process we'd like to see which PLIPs:
If this PLIP should still be considered for future releases of Plone please do re-open this ticket and assign an appropriate milestone. If it should be considered for the next release of Plone, use the 4.2 milestone. Also be sure to update the PLIP description, requester, owner, etc. and include a comment detailing recent progress and new plans. We will use all these details in the new continuous PLIP process.