Back to index

plone3  3.1.7
Classes | Functions | Variables
GroupUserFolder.interfaces.IUserFolder Namespace Reference

Classes

class  IUserFolder
class  IUserAtom
class  IUser
class  IGroup

Functions

def userSetRoles
 def setUserId(id, newId): """Change id of a user atom.
def userAddRole
def userRemoveRole
def userSetPassword
def userSetDomains
def userGetDomains
def userAddDomain
def userRemoveDomain
def userSetGroups
def userAddGroup
def userRemoveGroup
def setRolesOnUsers
def getUsersOfRole
 def setUsersOfRole(usernames, role): """Sets the users of a role.
def getRolesOfUser
def userFolderAddRole
def userFolderDelRoles
def userFolderGetRoles
def setMembers
def addMember
def removeMember
def hasMember
def getMemberIds
def getUserMemberIds
def getGroupMemberIds
def acquireLocalRoles
def isLocalRoleAcquired
def getAllLocalRoles
def setRoles
 def setId(newId): """Set the id of the user or group.
def addRole
def removeRole
def getRolesInContext
def has_permission
def allowed
def has_role
def isGroup
def getGroupNames
def getGroupIds
def getGroups
def getAllGroupIds
def getAllGroupNames
def isInGroup
def setGroups
def addGroup
def removeGroup
def getRealId

Variables

string __version__ = "$Revision: $"
 GroupUserFolder Copyright (C)2006 Ingeniweb.
string __docformat__ = 'restructuredtext'

Function Documentation

Enable or disable local role acquisition on the specified folder.
If status is true, it will enable, else it will disable.

Definition at line 399 of file IUserFolder.py.

00399 
00400     def acquireLocalRoles(folder, status):
00401         """Enable or disable local role acquisition on the specified folder.
00402         If status is true, it will enable, else it will disable.
00403         """

Append a group to the current object's groups.

Definition at line 547 of file IUserFolder.py.

00547 
00548     def addGroup(groupid):
00549         """Append a group to the current object's groups.
00550         """

Add a member to a group

Definition at line 368 of file IUserFolder.py.

00368 
00369     def addMember(groupid, id):
00370         """Add a member to a group
00371         """

Append a role to the user

Definition at line 478 of file IUserFolder.py.

00478 
00479     def addRole(role):
00480         """Append a role to the user
00481         """

def GroupUserFolder.interfaces.IUserFolder.allowed (   object,
  object_roles = None 
)
Check whether the user has access to object. The user must
   have one of the roles in object_roles to allow access.

Definition at line 496 of file IUserFolder.py.

00496 
00497     def allowed(object, object_roles=None):
00498         """Check whether the user has access to object. The user must
00499            have one of the roles in object_roles to allow access."""

Return the names of the groups that the user or group is a member of.
Return an empty list if the user or group doesn't belong to any group.
Include transitive groups.

Definition at line 529 of file IUserFolder.py.

00529 
00530     def getAllGroupIds():
00531         """Return the names of the groups that the user or group is a member of.
00532         Return an empty list if the user or group doesn't belong to any group.
00533         Include transitive groups."""

Return the names of the groups that the user or group is directly a member of.
Return an empty list if the user or group doesn't belong to any group.
Include transitive groups.

Definition at line 534 of file IUserFolder.py.

00534 
00535     def getAllGroupNames():
00536         """Return the names of the groups that the user or group is directly a member of.
00537         Return an empty list if the user or group doesn't belong to any group.
00538         Include transitive groups."""

Here is the caller graph for this function:

getAllLocalRoles(self, object): return a dictionnary {user: roles} of local
roles defined AND herited at a certain point. This will handle lr-blocking
as well.

Definition at line 410 of file IUserFolder.py.

00410 
00411     def getAllLocalRoles(object):
00412         """getAllLocalRoles(self, object): return a dictionnary {user: roles} of local
00413         roles defined AND herited at a certain point. This will handle lr-blocking
00414         as well.
00415         """
00416         

Return the names of the groups that the user or group is a member of.
Return an empty list if the user or group doesn't belong to any group.
Doesn't include transitive groups.

Definition at line 518 of file IUserFolder.py.

00518 
00519     def getGroupIds():
00520         """Return the names of the groups that the user or group is a member of.
00521         Return an empty list if the user or group doesn't belong to any group.
00522         Doesn't include transitive groups."""

Same as listMemberUserIds but only return group ids.
THIS METHOD CAN BE VERY EXPENSIVE AS IT NEEDS TO FETCH ALL USERS.

Definition at line 392 of file IUserFolder.py.

00392 
00393     def getGroupMemberIds(groupid):
00394         """Same as listMemberUserIds but only return group ids.
00395         THIS METHOD CAN BE VERY EXPENSIVE AS IT NEEDS TO FETCH ALL USERS.
00396         """
00397 

Return the names of the groups that the user or group is directly a member of.
Return an empty list if the user or group doesn't belong to any group.
Doesn't include transitive groups.

Definition at line 513 of file IUserFolder.py.

00513 
00514     def getGroupNames():
00515         """Return the names of the groups that the user or group is directly a member of.
00516         Return an empty list if the user or group doesn't belong to any group.
00517         Doesn't include transitive groups."""

getAllGroupIds() alias.
Return the IDS (not names) of the groups that the user or group is a member of.
Return an empty list if the user or group doesn't belong to any group.
THIS WILL INCLUDE TRANSITIVE GROUPS AS WELL.

Definition at line 523 of file IUserFolder.py.

00523 
00524     def getGroups():
00525         """getAllGroupIds() alias.
00526         Return the IDS (not names) of the groups that the user or group is a member of.
00527         Return an empty list if the user or group doesn't belong to any group.
00528         THIS WILL INCLUDE TRANSITIVE GROUPS AS WELL."""

Return the list of member ids (groups and users) in this group.
It will unmangle nested groups as well.
THIS METHOD CAN BE VERY EXPENSIVE AS IT NEEDS TO FETCH ALL USERS.

Definition at line 381 of file IUserFolder.py.

00381 
00382     def getMemberIds(groupid):
00383         """Return the list of member ids (groups and users) in this group.
00384         It will unmangle nested groups as well.
00385         THIS METHOD CAN BE VERY EXPENSIVE AS IT NEEDS TO FETCH ALL USERS.
00386         """

Return group id WITHOUT group prefix.
For a user, return regular user id.
This method is essentially internal.

Definition at line 555 of file IUserFolder.py.

00555 
00556     def getRealId():
00557         """Return group id WITHOUT group prefix.
00558         For a user, return regular user id.
00559         This method is essentially internal.
00560         """
00561 

Return the list of roles assigned to the user,
   including local roles assigned in context of
   the passed in object.

Definition at line 488 of file IUserFolder.py.

00488 
00489     def getRolesInContext(object):
00490         """Return the list of roles assigned to the user,
00491            including local roles assigned in context of
00492            the passed in object."""

Here is the caller graph for this function:

Alias for user.getRoles()

Definition at line 344 of file IUserFolder.py.

00344 
00345     def getRolesOfUser(userid):
00346         """Alias for user.getRoles()
00347         """

Same as listMemberIds but only return user ids
THIS METHOD CAN BE VERY EXPENSIVE AS IT NEEDS TO FETCH ALL USERS.

Definition at line 387 of file IUserFolder.py.

00387 
00388     def getUserMemberIds(groupid):
00389         """Same as listMemberIds but only return user ids
00390         THIS METHOD CAN BE VERY EXPENSIVE AS IT NEEDS TO FETCH ALL USERS.
00391         """

def GroupUserFolder.interfaces.IUserFolder.getUsersOfRole (   role,
  object = None 
)

def setUsersOfRole(usernames, role): """Sets the users of a role.

    XXX THIS METHOD SEEMS TO BE SEAMLESS.
    """  @verbatim Gets the user (and group) ids having the specified role...

...on the specified Zope object if it's not None ...on their own information if the object is None. NOTA: THIS METHOD IS VERY EXPENSIVE.

Definition at line 337 of file IUserFolder.py.

00337 
00338     def getUsersOfRole(role, object = None):
00339         """Gets the user (and group) ids having the specified role...
00340         ...on the specified Zope object if it's not None
00341         ...on their own information if the object is None.
00342         NOTA: THIS METHOD IS VERY EXPENSIVE.
00343         """

def GroupUserFolder.interfaces.IUserFolder.has_permission (   permission,
  object 
)
Check to see if a user has a given permission on an object.

Definition at line 493 of file IUserFolder.py.

00493 
00494     def has_permission(permission, object):
00495         """Check to see if a user has a given permission on an object."""

def GroupUserFolder.interfaces.IUserFolder.has_role (   roles,
  object = None 
)
Check to see if a user has a given role or roles.

Definition at line 500 of file IUserFolder.py.

00500 
00501     def has_role(roles, object=None):
00502         """Check to see if a user has a given role or roles."""
00503 
00504 

Here is the caller graph for this function:

Return true if the specified atom id is in the group.
This is the contrary of IUserAtom.isInGroup(groupid).
THIS CAN BE VERY EXPENSIVE

Definition at line 376 of file IUserFolder.py.

00376 
00377     def hasMember(groupid, id):
00378         """Return true if the specified atom id is in the group.
00379         This is the contrary of IUserAtom.isInGroup(groupid).
00380         THIS CAN BE VERY EXPENSIVE"""

Return true if this atom is a group.

Definition at line 509 of file IUserFolder.py.

00509 
00510     def isGroup():
00511         """Return true if this atom is a group.
00512         """

Here is the caller graph for this function:

Return true if the user is member of the specified group id
(including transitive groups)

Definition at line 539 of file IUserFolder.py.

00539 
00540     def isInGroup(groupid):
00541         """Return true if the user is member of the specified group id
00542         (including transitive groups)"""

Return true if the specified folder allows local role acquisition.

Definition at line 404 of file IUserFolder.py.

00404 
00405     def isLocalRoleAcquired(folder):
00406         """Return true if the specified folder allows local role acquisition.
00407         """

Remove a group from the object's groups

Definition at line 551 of file IUserFolder.py.

00551 
00552     def removeGroup(groupid):
00553         """Remove a group from the object's groups
00554         """

Remove a member from a group

Definition at line 372 of file IUserFolder.py.

00372 
00373     def removeMember(groupid, id):
00374         """Remove a member from a group
00375         """

Remove a role from the user's ones

Definition at line 482 of file IUserFolder.py.

00482 
00483     def removeRole(role):
00484         """Remove a role from the user's ones
00485         """

Set 'groupids' groups for the user or group.

Definition at line 543 of file IUserFolder.py.

00543 
00544     def setGroups(groupids):
00545         """Set 'groupids' groups for the user or group.
00546         """

def GroupUserFolder.interfaces.IUserFolder.setMembers (   groupid,
  userids 
)
Set the members of the group

Definition at line 364 of file IUserFolder.py.

00364 
00365     def setMembers(groupid, userids):
00366         """Set the members of the group
00367         """

def setId(newId): """Set the id of the user or group.

This might change its name as well. """ def setName(newName): """Set the name of the user or group. Depending on the UserFolder implementation, this might change the id as well. """

Change user's roles

Definition at line 474 of file IUserFolder.py.

00474 
00475     def setRoles(roles):
00476         """Change user's roles
00477         """

Here is the caller graph for this function:

Set a common set of roles for a bunch of user atoms.

Definition at line 328 of file IUserFolder.py.

00328 
00329     def setRolesOnUsers(roles, userids):
00330         """Set a common set of roles for a bunch of user atoms.
00331         """

Append a domain to a user

Definition at line 302 of file IUserFolder.py.

00302 
00303     def userAddDomain(id, domain):
00304         """Append a domain to a user
00305         """

add a group to a user atom. Groupnames are, as usual, not prefixed.
However, a groupid can be given as a fallback

Definition at line 315 of file IUserFolder.py.

00315 
00316     def userAddGroup(id, groupname):
00317         """add a group to a user atom. Groupnames are, as usual, not prefixed.
00318         However, a groupid can be given as a fallback
00319         """

Append a role for a user atom

Definition at line 281 of file IUserFolder.py.

00281 
00282     def userAddRole(id, role):
00283         """Append a role for a user atom
00284         """

Add a new role. The role will be appended, in fact, in GRUF's surrounding folder.

Definition at line 348 of file IUserFolder.py.

00348 
00349     def userFolderAddRole(role):
00350         """Add a new role. The role will be appended, in fact, in GRUF's surrounding folder.
00351         """

Delete roles.
The removed roles will be removed from the UserFolder's users and groups as well,
so this method can be very time consuming with a large number of users.

Definition at line 352 of file IUserFolder.py.

00352 
00353     def userFolderDelRoles(roles):
00354         """Delete roles.
00355         The removed roles will be removed from the UserFolder's users and groups as well,
00356         so this method can be very time consuming with a large number of users.
00357         """

List the roles defined at the top of GRUF's folder.

Definition at line 358 of file IUserFolder.py.

00358 
00359     def userFolderGetRoles():
00360         """List the roles defined at the top of GRUF's folder.
00361         """
00362 

Get domains for a user

Definition at line 298 of file IUserFolder.py.

00298 
00299     def userGetDomains(id, ):
00300         """Get domains for a user
00301         """

Remove a domain from a user

Definition at line 306 of file IUserFolder.py.

00306 
00307     def userRemoveDomain(id, domain):
00308         """Remove a domain from a user
00309         """

remove a group from a user atom. Groupnames are, as usual, not prefixed.
However, a groupid can be given as a fallback

Definition at line 320 of file IUserFolder.py.

00320 
00321     def userRemoveGroup(id, groupname):
00322         """remove a group from a user atom. Groupnames are, as usual, not prefixed.
00323         However, a groupid can be given as a fallback
00324         """
00325 

Remove the role of a user atom.
This will not, of course, affect implicitly-acquired roles from the user groups.

Definition at line 285 of file IUserFolder.py.

00285 
00286     def userRemoveRole(id, role):
00287         """Remove the role of a user atom.
00288         This will not, of course, affect implicitly-acquired roles from the user groups.
00289         """

Set domains for a user

Definition at line 294 of file IUserFolder.py.

00294 
00295     def userSetDomains(id, domains):
00296         """Set domains for a user
00297         """

def GroupUserFolder.interfaces.IUserFolder.userSetGroups (   userid,
  groupnames 
)
Set the groups of a user. Groupnames are, as usual, not prefixed.
However, a groupid can be given as a fallback

Definition at line 310 of file IUserFolder.py.

00310 
00311     def userSetGroups(userid, groupnames):
00312         """Set the groups of a user. Groupnames are, as usual, not prefixed.
00313         However, a groupid can be given as a fallback
00314         """

Set the password of a user

Definition at line 290 of file IUserFolder.py.

00290 
00291     def userSetPassword(id, newPassword):
00292         """Set the password of a user
00293         """

def setUserId(id, newId): """Change id of a user atom.

The user name might be changed as well by this operation. """ def setUserName(id, newName): """Change the name of a user atom. The user id might be changed as well by this operation. """

Change the roles of a user atom

Definition at line 277 of file IUserFolder.py.

00277 
00278     def userSetRoles(id, roles):
00279         """Change the roles of a user atom
00280         """


Variable Documentation

Definition at line 41 of file IUserFolder.py.

GroupUserFolder Copyright (C)2006 Ingeniweb.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; see the file COPYING. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

Definition at line 38 of file IUserFolder.py.