Hello,

i try to add Properties to all of my PAS-Users.
The Properties should be the adresse information
of my Users, which i get about an WebService.

Now i have developed a very simple example of a
IPropertiesPlugin:


    security.declarePrivate('getPropertiesForUser')
    def getPropertiesForUser(self, user, request=None):
        """ Fullfill PropertiesPlugin requirements """
        ### Cache Implementation
        view_name = createViewName('retrievePropsData', user)
        keywords = {'key' : user}
        properties = self.ZCacheable_get( view_name = view_name,
                                           keywords = keywords,
                                           default = None )
        if properties is None:
            properties = {}
            properties['addr'] = "SampleData"
            tt=self.ZCacheable_set( properties ,
                                      view_name=view_name,
                                      keywords=keywords )
        return properties

Now i have some questions about it:

Shoud I use (and why) the UserPropertySheet instead of a simple dict?
Is the cache implementation ok?
Does anyone have a simple example for this task?


thx Christian

_______________________________________________
Zope-PAS mailing list
Zope-PAS@zope.org
http://mail.zope.org/mailman/listinfo/zope-pas

Reply via email to