Andreas Jung wrote:
Hi there,

we work with FacultyStaffDirecty where one core content-type of FSD
is 'Person'. The 'Person' implementation uses Membrane to integrate with
Plone:

class Person(OrderedBaseFolder, ATCTContent):
    """A person in the Faculty/Staff directory"""
    meta_type = portal_type = "FSDPerson"


    implements(IPerson,
               IUserAuthProvider,
               IPropertiesProvider,
               IGroupsProvider,
               IGroupAwareRolesProvider,
               IAttributeAnnotatable,
               IUserChanger)

Within a current project Plone users authenticated against LDAP and member properties like name, address and email should be taken from LDAP (the mapping from LDAP to member properties is not the problem)
and being used directly as properties of Person instances. This means
that the accessor methods of the related fields of the Person schema
should access the properties of the related members instead of pre-defined accessor methods performing attribute accesson the instance itself. This is something that can be achieved through Membrane?

i think using a workaround like raphael's AT storage layer is probably your best bet. what you're trying to do is a little bit upside-down. Membrane provides PAS plug-ins so you can use AT field values as member properties. and you also have other PAS plug-ins that let you use LDAP data as member properties. all of the properties are already available in the MemberData object, but of course this doesn't provide the auto-generated UI that AT content gives you, so it's probably not what you want.

by using raphael's storage, or possibly by repurposing CMFMember's LDAPStorage (http://svn.zope.de/plone.org/collective/CMFMember/trunk/storages/), you can make the data available on your Person object. you'll want to make sure you _don't_ flag those fields with "user_property=True", however, or you might end up with some weird results as you'll be sending the same values through as member properties from two different sources.

-r


_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers

Reply via email to