Personal tools
You are here: Home Products Plone Roadmap #143: Membership UI improvements
Document Actions

#143: Membership UI improvements

Contents
  1. Definitions
  2. Motivation
  3. Assumptions
  4. Proposal
  5. Implementation
  6. Deliverables
by Kamon Ayeva last modified June 11, 2006 - 00:22
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 :

  1. Complete the personal preferences UI by providing a consistent public-facing memberdata view (currently provided by the 'author.pt' template).
  2. 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.



For any issues with the web site functionality, please file a ticket.

Please consult the policy on plone.org content if you want your content published on this site.

Servers and hosting by