Back to index

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

Classes

class  portal_groups

Functions

def isGroup
 id = Attribute('id','Must be set to "portal_groups"')
def getGroupById
def getGroupsByUserId
def listGroups
def listGroupIds
def listGroupNames
def searchForGroups
 def getPureUserNames(): """Get the usernames (ids) of only users. """
def addGroup
def editGroup
def removeGroups
def setGroupOwnership
def setGroupWorkspacesFolder
def getGroupWorkspacesFolderId
def getGroupWorkspacesFolder
def toggleGroupWorkspacesCreation
def getGroupWorkspacesCreationFlag
def getGroupWorkspaceType
def setGroupWorkspaceType
def createGrouparea
def getGroupareaFolder
def getGroupareaURL

Variables

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

Function Documentation

def GroupUserFolder.interfaces.portal_groups.addGroup (   id,
  roles = [],
  groups = [],
  kw 
)
Create a group with the supplied id, roles, and groups.

Underlying user folder must support adding users via the usual Zope API.
Passwords for groups seem to be currently irrelevant in GRUF.

Definition at line 75 of file portal_groups.py.

00075 
00076     def addGroup(id, roles = [], groups = [], **kw):
00077         """Create a group with the supplied id, roles, and groups.
00078 
00079         Underlying user folder must support adding users via the usual Zope API.
00080         Passwords for groups seem to be currently irrelevant in GRUF."""

Create a space in the portal for the given group, much like member home
folders.

Definition at line 134 of file portal_groups.py.

00134 
00135     def createGrouparea(id):
00136         """Create a space in the portal for the given group, much like member home
00137         folders."""

def GroupUserFolder.interfaces.portal_groups.editGroup (   id,
  roles = [],
  groups = [],
  kw 
)
Edit the given group with the supplied roles.

Underlying user folder must support editing users via the usual Zope API.
Passwords for groups seem to be currently irrelevant in GRUF.
One can supply additional named parameters to set group properties.

Definition at line 81 of file portal_groups.py.

00081 
00082     def editGroup(id, roles = [], groups = [], **kw):
00083         """Edit the given group with the supplied roles.
00084 
00085         Underlying user folder must support editing users via the usual Zope API.
00086         Passwords for groups seem to be currently irrelevant in GRUF.
00087         One can supply additional named parameters to set group properties."""

Returns the object of the group's work area.

Definition at line 138 of file portal_groups.py.

00138 
00139     def getGroupareaFolder(id):
00140         """Returns the object of the group's work area."""

Returns the full URL to the group's work area.

Definition at line 141 of file portal_groups.py.

00141 
00142     def getGroupareaURL(id):
00143         """Returns the full URL to the group's work area."""

Returns the portal_groupdata-ish object for a group corresponding
to this id.

Definition at line 49 of file portal_groups.py.

00049 
00050     def getGroupById(id):
00051         """Returns the portal_groupdata-ish object for a group corresponding
00052         to this id."""

Returns a list of the groups the user corresponding to 'userid' belongs to.

Definition at line 53 of file portal_groups.py.

00053 
00054     def getGroupsByUserId(userid):
00055         """Returns a list of the groups the user corresponding to 'userid' belongs to."""

Return the (boolean) flag indicating whether the Groups Tool will create a group workspace
upon the next use of the group (if one doesn't exist). 

Definition at line 124 of file portal_groups.py.

00124 
00125     def getGroupWorkspacesCreationFlag():
00126         """Return the (boolean) flag indicating whether the Groups Tool will create a group workspace
00127         upon the next use of the group (if one doesn't exist). """

Get the Group Workspaces folder object.

The Group Workspaces Folder contains all the group workspaces, just like the
Members folder contains all the member folders. 

Definition at line 114 of file portal_groups.py.

00114 
00115     def getGroupWorkspacesFolder():
00116         """ Get the Group Workspaces folder object.
00117 
00118         The Group Workspaces Folder contains all the group workspaces, just like the
00119         Members folder contains all the member folders. """

Get the Group Workspaces folder object's id.

The Group Workspaces Folder contains all the group workspaces, just like the
Members folder contains all the member folders. 

Definition at line 108 of file portal_groups.py.

00108 
00109     def getGroupWorkspacesFolderId():
00110         """ Get the Group Workspaces folder object's id.
00111 
00112         The Group Workspaces Folder contains all the group workspaces, just like the
00113         Members folder contains all the member folders. """

Return the Type (as in TypesTool) to make the GroupWorkspace.

Definition at line 128 of file portal_groups.py.

00128 
00129     def getGroupWorkspaceType():
00130         """Return the Type (as in TypesTool) to make the GroupWorkspace."""

id = Attribute('id','Must be set to "portal_groups"')

Test if a user/group object is a group or not.
You must pass an object you get earlier with wrapUser() or wrapGroup()

Definition at line 44 of file portal_groups.py.

00044 
00045     def isGroup(u):
00046         """Test if a user/group object is a group or not.
00047         You must pass an object you get earlier with wrapUser() or wrapGroup()
00048         """

Returns a list of the available groups' ids (WITHOUT prefixes).

Definition at line 59 of file portal_groups.py.

00059 
00060     def listGroupIds():
00061         """Returns a list of the available groups' ids (WITHOUT prefixes)."""

Returns a list of the available groups' names (ie. without prefixes).

Definition at line 62 of file portal_groups.py.

00062 
00063     def listGroupNames():
00064         """Returns a list of the available groups' names (ie. without prefixes)."""

Returns a list of the available portal_groupdata-ish objects.

Definition at line 56 of file portal_groups.py.

00056 
00057     def listGroups():
00058         """Returns a list of the available portal_groupdata-ish objects."""

def GroupUserFolder.interfaces.portal_groups.removeGroups (   ids,
  keep_workspaces = 0 
)
Remove the group in the provided list (if possible).

Will by default remove this group's GroupWorkspace if it exists. You may
turn this off by specifying keep_workspaces=true.
Underlying user folder must support removing users via the usual Zope API.

Definition at line 88 of file portal_groups.py.

00088 
00089     def removeGroups(ids, keep_workspaces=0):
00090         """Remove the group in the provided list (if possible).
00091 
00092         Will by default remove this group's GroupWorkspace if it exists. You may
00093         turn this off by specifying keep_workspaces=true.
00094         Underlying user folder must support removing users via the usual Zope API."""

def getPureUserNames(): """Get the usernames (ids) of only users. """

def getPureUsers(): """Get the actual (unwrapped) user objects of only users. """

Return a list of groups meeting certain conditions. 

Definition at line 71 of file portal_groups.py.

00071 
00072     def searchForGroups(REQUEST, **kw):    # maybe searchGroups()?
00073         """Return a list of groups meeting certain conditions. """
00074         # arguments need to be better refined?

Make the object 'object' owned by group 'group' (a portal_groupdata-ish object)

Definition at line 95 of file portal_groups.py.

00095 
00096     def setGroupOwnership(group, object):
00097         """Make the object 'object' owned by group 'group' (a portal_groupdata-ish object)"""

Set the location of the Group Workspaces folder by id.

The Group Workspaces Folder contains all the group workspaces, just like the
Members folder contains all the member folders.

If anyone really cares, we can probably make the id work as a path as well,
but for the moment it's only an id for a folder in the portal root, just like the
corresponding MembershipTool functionality. 

Definition at line 98 of file portal_groups.py.

00098 
00099     def setGroupWorkspacesFolder(id=""):
00100         """ Set the location of the Group Workspaces folder by id.
00101 
00102         The Group Workspaces Folder contains all the group workspaces, just like the
00103         Members folder contains all the member folders.
00104 
00105         If anyone really cares, we can probably make the id work as a path as well,
00106         but for the moment it's only an id for a folder in the portal root, just like the
00107         corresponding MembershipTool functionality. """

Set the Type (as in TypesTool) to make the GroupWorkspace. Expects the name of a Type.

Definition at line 131 of file portal_groups.py.

00131 
00132     def setGroupWorkspaceType(type):
00133         """Set the Type (as in TypesTool) to make the GroupWorkspace. Expects the name of a Type."""

Toggles the flag for creation of a GroupWorkspaces folder upon first
use of the group. 

Definition at line 120 of file portal_groups.py.

00120 
00121     def toggleGroupWorkspacesCreation():
00122         """ Toggles the flag for creation of a GroupWorkspaces folder upon first
00123         use of the group. """


Variable Documentation

Definition at line 29 of file portal_groups.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. Copyright (c) 2003 The Connexions Project, All Rights Reserved initially written by J Cameron Cooper, 11 June 2003 concept with Brent Hendricks, George Runyan

Definition at line 26 of file portal_groups.py.