Back to index

plone3  3.1.7
Public Member Functions | Static Public Attributes | Private Member Functions
PlonePAS.tools.memberdata.MemberDataTool Class Reference
Collaboration diagram for PlonePAS.tools.memberdata.MemberDataTool:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def wrapUser
 an exact copy from the base, so that we pick up the new MemberData.
def deleteMemberData

Static Public Attributes

string meta_type = "PlonePAS MemberData Tool"
string toolicon = 'tool.gif'

Private Member Functions

def _getPlugins
 plugin getter

Detailed Description

PAS-specific implementation of memberdata tool. Uses Plone
MemberDataTool as a base.

Definition at line 46 of file memberdata.py.


Member Function Documentation

plugin getter

Definition at line 98 of file memberdata.py.

00098 
00099     def _getPlugins(self):
00100         return self.acl_users.plugins
00101 
00102 InitializeClass(MemberDataTool)
00103 

Here is the caller graph for this function:

def PlonePAS.tools.memberdata.MemberDataTool.deleteMemberData (   self,
  member_id,
  REQUEST = None 
)
Delete member data of specified member.

Definition at line 73 of file memberdata.py.

00073 
00074     def deleteMemberData(self, member_id, REQUEST=None):
00075         """ Delete member data of specified member.
00076         """
00077         if IPluggableAuthService.providedBy(self.acl_users):
00078             # It's a PAS! Whee!
00079             # XXX: can we safely assume that user name == member_id
00080             plugins = self._getPlugins()
00081             prop_managers = plugins.listPlugins(IPropertiesPlugin)
00082             for mid, prop_manager in prop_managers:
00083                 # Not all PropertiesPlugins support user deletion
00084                 try:
00085                     prop_manager.deleteUser(member_id)
00086                 except AttributeError:
00087                     pass
00088 
00089         # we won't always have PlonePAS users, due to acquisition,
00090         # nor are guaranteed property sheets
00091         members = self._members
00092         if members.has_key(member_id):
00093             del members[member_id]
00094             return 1
00095         else:
00096             return 0

Here is the call graph for this function:

an exact copy from the base, so that we pick up the new MemberData.

wrapUser should have a MemberData factory method to over-ride (or even set at run-time!) so that we don't have to do this.

If possible, returns the Member object that corresponds
to the given User object.
We override this to ensure OUR MemberData class is used

Definition at line 57 of file memberdata.py.

00057 
00058     def wrapUser(self, u):
00059         '''
00060         If possible, returns the Member object that corresponds
00061         to the given User object.
00062         We override this to ensure OUR MemberData class is used
00063         '''
00064         id = u.getId()
00065         members = self._members
00066         if not members.has_key(id):
00067             base = aq_base(self)
00068             members[id] = MemberData(base, id)
00069         # Return a wrapper with self as containment and
00070         # the user as context.
00071         return members[id].__of__(self).__of__(u)

Here is the caller graph for this function:


Member Data Documentation

Definition at line 51 of file memberdata.py.

Definition at line 52 of file memberdata.py.


The documentation for this class was generated from the following file: