Back to index

plone3  3.1.7
Public Member Functions
GroupUserFolder.interfaces.IUserFolder.IUserFolder Class Reference
Inheritance diagram for GroupUserFolder.interfaces.IUserFolder.IUserFolder:
Inheritance graph
[legend]
Collaboration diagram for GroupUserFolder.interfaces.IUserFolder.IUserFolder:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def getUserNames
def getUserIds
def getUser
def getUsers
def getUserById
def getUserByName
def hasUsers
def searchUsersByName
def searchUsersById
def searchUsersByAttribute
def searchGroupsByName
def searchGroupsById
def searchGroupsByAttribute
def getPureUserNames
def getPureUserIds
def getPureUsers
def getPureUser
def getGroupNames
def getGroupIds
def getGroups
def getGroup
def getGroupById
def getGroupByName
def userFolderAddUser
def userFolderEditUser
def userFolderUpdateUser
def userFolderDelUsers
def userFolderAddGroup
def userFolderEditGroup
def userFolderUpdateGroup
def userFolderDelGroups

Detailed Description

Definition at line 52 of file IUserFolder.py.


Member Function Documentation

Return the named group object or None. As usual, 'id' is prefixed.

Definition at line 208 of file IUserFolder.py.

00208 
00209     def getGroup(name):
00210         """Return the named group object or None. As usual, 'id' is prefixed.
00211         """

Here is the caller graph for this function:

Same as getUserById(id) but forces returning a group.

Definition at line 212 of file IUserFolder.py.

00212 
00213     def getGroupById(id):
00214         """Same as getUserById(id) but forces returning a group.
00215         """

Here is the caller graph for this function:

Same as getUserByName(name) but forces returning a group.
The specified name MUST NOT be prefixed !

Definition at line 216 of file IUserFolder.py.

00216 
00217     def getGroupByName(name):
00218         """Same as getUserByName(name) but forces returning a group.
00219         The specified name MUST NOT be prefixed !
00220         """
00221     

Same as getUserIds() but without pure users.

Definition at line 194 of file IUserFolder.py.

00194 
00195     def getGroupIds():
00196         """Same as getUserIds() but without pure users.
00197         """

Here is the caller graph for this function:

Same as getUserNames() but without pure users.

Definition at line 190 of file IUserFolder.py.

00190 
00191     def getGroupNames():
00192         """Same as getUserNames() but without pure users.
00193         """

Same as getUsers() but without pure users.
In case of some UF implementations, the returned object may only be a subset
of all possible users.
In other words, you CANNOT assert that len(getUsers()) equals len(getUserNames()).
With cache-support UserFolders, such as LDAPUserFolder, the getUser() method will
return only cached user objects instead of fetching all possible users.
So this method won't be very time-expensive, but won't be accurate !

Definition at line 198 of file IUserFolder.py.

00198 
00199     def getGroups():
00200         """Same as getUsers() but without pure users.
00201         In case of some UF implementations, the returned object may only be a subset
00202         of all possible users.
00203         In other words, you CANNOT assert that len(getUsers()) equals len(getUserNames()).
00204         With cache-support UserFolders, such as LDAPUserFolder, the getUser() method will
00205         return only cached user objects instead of fetching all possible users.
00206         So this method won't be very time-expensive, but won't be accurate !
00207         """

Here is the caller graph for this function:

Same as getUser() but forces returning a user and not a group

Definition at line 184 of file IUserFolder.py.

00184 
00185     def getPureUser(id):
00186         """Same as getUser() but forces returning a user and not a group
00187         """
        
Same as getUserIds() but without groups

Definition at line 176 of file IUserFolder.py.

00176 
00177     def getPureUserIds():
00178         """Same as getUserIds() but without groups
00179         """

Same as getUserNames() but without groups

Definition at line 172 of file IUserFolder.py.

00172 
00173     def getPureUserNames():
00174         """Same as getUserNames() but without groups
00175         """

Same as getUsers() but without groups.

Definition at line 180 of file IUserFolder.py.

00180 
00181     def getPureUsers():
00182         """Same as getUsers() but without groups.
00183         """

Return the named user atom object or None
NOTA: If no user can be found, we try to append a group prefix
and fetch the user again before returning 'None'. This will ensure
backward compatibility. So in fact, both group id and group name can be
specified to this method.

Definition at line 77 of file IUserFolder.py.

00077 
00078     def getUser(name):
00079         """Return the named user atom object or None
00080         NOTA: If no user can be found, we try to append a group prefix
00081         and fetch the user again before returning 'None'. This will ensure
00082         backward compatibility. So in fact, both group id and group name can be
00083         specified to this method.
00084         """

Here is the caller graph for this function:

Return the user atom corresponding to the given id.
If default is provided, return default if no user found, else return None.

Definition at line 95 of file IUserFolder.py.

00095 
00096     def getUserById(id, default):
00097         """Return the user atom corresponding to the given id.
00098         If default is provided, return default if no user found, else return None.
00099         """

Same as getUserById() but works with a name instead of an id.
If default is provided, return default if no user found, else return None.
[NOTA: Theorically, the id is a handle, while the name is the actual login name.
But difference between a user id and a user name is unsignificant in
all current User Folder implementations... except for GROUPS.]        

Definition at line 100 of file IUserFolder.py.

00100 
00101     def getUserByName(name, default):
00102         """Same as getUserById() but works with a name instead of an id.
00103         If default is provided, return default if no user found, else return None.
00104         [NOTA: Theorically, the id is a handle, while the name is the actual login name.
00105         But difference between a user id and a user name is unsignificant in
00106         all current User Folder implementations... except for GROUPS.]        
00107         """

Return a list of all possible user atom ids in the system.
WARNING: Please see the id Vs. name consideration at the
top of this document. So, groups will be returned
WITH their prefix by this method
[NOTA: This method is time-expensive !]

Definition at line 68 of file IUserFolder.py.

00068 
00069     def getUserIds():
00070         """
00071         Return a list of all possible user atom ids in the system.
00072         WARNING: Please see the id Vs. name consideration at the
00073         top of this document. So, groups will be returned
00074         WITH their prefix by this method
00075         [NOTA: This method is time-expensive !]
00076         """
        

Here is the caller graph for this function:

Return a list of all possible user atom names in the system.
Groups will be returned WITHOUT their prefix by this method.
So, there might be a collision between a user name and a group name.
[NOTA: This method is time-expensive !]

Definition at line 60 of file IUserFolder.py.

00060 
00061     def getUserNames():
00062         """
00063         Return a list of all possible user atom names in the system.
00064         Groups will be returned WITHOUT their prefix by this method.
00065         So, there might be a collision between a user name and a group name.
00066         [NOTA: This method is time-expensive !]
00067         """

Return a list of user atom objects in the users cache.
In case of some UF implementations, the returned object may only be a subset
of all possible users.
In other words, you CANNOT assert that len(getUsers()) equals len(getUserNames()).
With cache-support UserFolders, such as LDAPUserFolder, the getUser() method will
return only cached user objects instead of fetching all possible users.
So this method won't be very time-expensive, but won't be accurate !

Definition at line 85 of file IUserFolder.py.

00085 
00086     def getUsers():
00087         """Return a list of user atom objects in the users cache.
00088         In case of some UF implementations, the returned object may only be a subset
00089         of all possible users.
00090         In other words, you CANNOT assert that len(getUsers()) equals len(getUserNames()).
00091         With cache-support UserFolders, such as LDAPUserFolder, the getUser() method will
00092         return only cached user objects instead of fetching all possible users.
00093         So this method won't be very time-expensive, but won't be accurate !
00094         """

From Zope 2.7's User.py:
This is not a formal API method: it is used only to provide
a way for the quickstart page to determine if the default user
folder contains any users to provide instructions on how to
add a user for newbies.  Using getUserNames or getUsers would have
posed a denial of service risk.
In GRUF, this method always return 1.

Definition at line 108 of file IUserFolder.py.

00108 
00109     def hasUsers():
00110         """
00111         From Zope 2.7's User.py:
00112         This is not a formal API method: it is used only to provide
00113         a way for the quickstart page to determine if the default user
00114         folder contains any users to provide instructions on how to
00115         add a user for newbies.  Using getUserNames or getUsers would have
00116         posed a denial of service risk.
00117         In GRUF, this method always return 1."""
00118     

Return group ids whose 'attribute' match the specified search_term.
If search_term is an empty string, behaviour depends on the underlying group folder:
it may return all groups, return only cached groups (for LDAPUF) or return no groups.
This will return all groups whose name contains search_term (whaterver its case).
THIS METHOD MAY BE VERY EXPENSIVE ON GROUP FOLDER KINDS WHICH DO NOT PROVIDE A
SEARCHING METHOD (ie. every UF kind except LDAPUF).
'attribute' can be 'id' or 'name' for all UF kinds, or anything else for LDAPUF.
[NOTA: This method is time-expensive !]

Definition at line 158 of file IUserFolder.py.

00158 
00159     def searchGroupsByAttribute(attribute, search_term):
00160         """Return group ids whose 'attribute' match the specified search_term.
00161         If search_term is an empty string, behaviour depends on the underlying group folder:
00162         it may return all groups, return only cached groups (for LDAPUF) or return no groups.
00163         This will return all groups whose name contains search_term (whaterver its case).
00164         THIS METHOD MAY BE VERY EXPENSIVE ON GROUP FOLDER KINDS WHICH DO NOT PROVIDE A
00165         SEARCHING METHOD (ie. every UF kind except LDAPUF).
00166         'attribute' can be 'id' or 'name' for all UF kinds, or anything else for LDAPUF.
00167         [NOTA: This method is time-expensive !]
00168         """
00169 

Return groups whose id match the specified search_term.
If search_term is an empty string, behaviour depends on the underlying group folder:
it may return all groups, return only cached groups (for LDAPUF) or return no groups.

Definition at line 152 of file IUserFolder.py.

00152 
00153     def searchGroupsById(search_term):
00154         """Return groups whose id match the specified search_term.
00155         If search_term is an empty string, behaviour depends on the underlying group folder:
00156         it may return all groups, return only cached groups (for LDAPUF) or return no groups.
00157         """
        
Return group ids which match the specified search_term.
If search_term is an empty string, behaviour depends on the underlying group folder:
it may return all groups, return only cached groups (for LDAPUF) or return no groups.

Definition at line 146 of file IUserFolder.py.

00146 
00147     def searchGroupsByName(search_term):
00148         """Return group ids which match the specified search_term.
00149         If search_term is an empty string, behaviour depends on the underlying group folder:
00150         it may return all groups, return only cached groups (for LDAPUF) or return no groups.
00151         """

Return user ids whose 'attribute' match the specified search_term.
If search_term is an empty string, behaviour depends on the underlying user folder:
it may return all users, return only cached users (for LDAPUF) or return no users.
This will return all users whose name contains search_term (whaterver its case).
THIS METHOD MAY BE VERY EXPENSIVE ON USER FOLDER KINDS WHICH DO NOT PROVIDE A
SEARCHING METHOD (ie. every UF kind except LDAPUF).
'attribute' can be 'id' or 'name' for all UF kinds, or anything else for LDAPUF.
[NOTA: This method is time-expensive !]

Definition at line 133 of file IUserFolder.py.

00133 
00134     def searchUsersByAttribute(attribute, search_term):
00135         """Return user ids whose 'attribute' match the specified search_term.
00136         If search_term is an empty string, behaviour depends on the underlying user folder:
00137         it may return all users, return only cached users (for LDAPUF) or return no users.
00138         This will return all users whose name contains search_term (whaterver its case).
00139         THIS METHOD MAY BE VERY EXPENSIVE ON USER FOLDER KINDS WHICH DO NOT PROVIDE A
00140         SEARCHING METHOD (ie. every UF kind except LDAPUF).
00141         'attribute' can be 'id' or 'name' for all UF kinds, or anything else for LDAPUF.
00142         [NOTA: This method is time-expensive !]
00143         """

Return users whose id match the specified search_term.
If search_term is an empty string, behaviour depends on the underlying user folder:
it may return all users, return only cached users (for LDAPUF) or return no users.

Definition at line 127 of file IUserFolder.py.

00127 
00128     def searchUsersById(search_term):
00129         """Return users whose id match the specified search_term.
00130         If search_term is an empty string, behaviour depends on the underlying user folder:
00131         it may return all users, return only cached users (for LDAPUF) or return no users.
00132         """
        
Return user ids which match the specified search_term.
If search_term is an empty string, behaviour depends on the underlying user folder:
it may return all users, return only cached users (for LDAPUF) or return no users.

Definition at line 121 of file IUserFolder.py.

00121 
00122     def searchUsersByName(search_term):
00123         """Return user ids which match the specified search_term.
00124         If search_term is an empty string, behaviour depends on the underlying user folder:
00125         it may return all users, return only cached users (for LDAPUF) or return no users.
00126         """

def GroupUserFolder.interfaces.IUserFolder.IUserFolder.userFolderAddGroup (   name,
  roles,
  groups,
  kw 
)
API method for creating a new group.

Definition at line 245 of file IUserFolder.py.

00245 
00246     def userFolderAddGroup(name, roles, groups, **kw):
00247         """API method for creating a new group.
00248         """
        
def GroupUserFolder.interfaces.IUserFolder.IUserFolder.userFolderAddUser (   name,
  password,
  roles,
  domains,
  groups,
  kw 
)
API method for creating a new user object. Note that not all
user folder implementations support dynamic creation of user
objects.
Groups can be specified by name or by id (preferabily by name).

Definition at line 224 of file IUserFolder.py.

00224 
00225     def userFolderAddUser(name, password, roles, domains, groups, **kw):
00226         """API method for creating a new user object. Note that not all
00227         user folder implementations support dynamic creation of user
00228         objects.
00229         Groups can be specified by name or by id (preferabily by name)."""

API method for deleting one or more group objects.
Implem. note : All ids must be prefixed with 'group_',
so this method ends up beeing only a filter of non-prefixed ids
before calling userFolderDelUsers().

Definition at line 258 of file IUserFolder.py.

00258 
00259     def userFolderDelGroups(names):
00260         """API method for deleting one or more group objects.
00261         Implem. note : All ids must be prefixed with 'group_',
00262         so this method ends up beeing only a filter of non-prefixed ids
00263         before calling userFolderDelUsers().
00264         """

API method for deleting one or more user atom objects. Note that not
all user folder implementations support deletion of user objects.

Definition at line 241 of file IUserFolder.py.

00241 
00242     def userFolderDelUsers(names):
00243         """API method for deleting one or more user atom objects. Note that not
00244         all user folder implementations support deletion of user objects."""

def GroupUserFolder.interfaces.IUserFolder.IUserFolder.userFolderEditGroup (   name,
  roles,
  groups,
  kw 
)
API method for changing group object attributes.

Definition at line 249 of file IUserFolder.py.

00249 
00250     def userFolderEditGroup(name, roles, groups, **kw):
00251         """API method for changing group object attributes.
00252         """

def GroupUserFolder.interfaces.IUserFolder.IUserFolder.userFolderEditUser (   name,
  password,
  roles,
  domains,
  groups,
  kw 
)
API method for changing user object attributes. Note that not
all user folder implementations support changing of user object
attributes.
Groups can be specified by name or by id (preferabily by name).

Definition at line 230 of file IUserFolder.py.

00230 
00231     def userFolderEditUser(name, password, roles, domains, groups, **kw):
00232         """API method for changing user object attributes. Note that not
00233         all user folder implementations support changing of user object
00234         attributes.
00235         Groups can be specified by name or by id (preferabily by name)."""

def GroupUserFolder.interfaces.IUserFolder.IUserFolder.userFolderUpdateGroup (   name,
  roles,
  groups,
  kw 
)
Same as userFolderEditGroup but with all arguments (except name) being
optinal.

Definition at line 253 of file IUserFolder.py.

00253 
00254     def userFolderUpdateGroup(name, roles, groups, **kw):
00255         """Same as userFolderEditGroup but with all arguments (except name) being
00256         optinal.
00257         """

def GroupUserFolder.interfaces.IUserFolder.IUserFolder.userFolderUpdateUser (   name,
  password,
  roles,
  domains,
  groups,
  kw 
)
Same as userFolderEditUser, but with all arguments except name
being optional.

Definition at line 236 of file IUserFolder.py.

00236 
00237     def userFolderUpdateUser(name, password, roles, domains, groups, **kw):
00238         """Same as userFolderEditUser, but with all arguments except name
00239         being optional.
00240         """


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