Back to index

plone3  3.1.7
Classes | Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions | Static Private Attributes
GroupUserFolder.GRUFFolder.GRUFGroups Class Reference
Inheritance diagram for GroupUserFolder.GRUFFolder.GRUFGroups:
Inheritance graph
[legend]
Collaboration diagram for GroupUserFolder.GRUFFolder.GRUFGroups:
Collaboration graph
[legend]

List of all members.

Classes

class  C__ac_roles__

Public Member Functions

def header_text
def listGroups
def userdefined_roles
def __creatable_by_emergency_user__
def getId
def getUserSourceId
def isValid
def getUserFolder
def getUserNames

Public Attributes

 id

Static Public Attributes

string meta_type = "GRUFGroups"
string default_id = "Groups"
int isAnObjectManager = 1
int isPrincipiaFolderish = 1
tuple manage_main = DTMLFile('dtml/GRUFFolder_main', globals())
tuple manage_options = ( {'label':'Contents', 'action':'manage_main'}, )
tuple security = ClassSecurityInfo()

Private Member Functions

def _getGroup

Static Private Attributes

string _group_prefix = "group_"
 __ac_roles__ = ac_roles

Detailed Description

GRUFGroups : GRUFFolder that holds groups

Definition at line 225 of file GRUFFolder.py.


Member Function Documentation

Definition at line 85 of file GRUFFolder.py.

00085 
00086     def __creatable_by_emergency_user__(self): return 1

def GroupUserFolder.GRUFFolder.GRUFGroups._getGroup (   self,
  id 
) [private]
_getGroup(self, id) => same as getUser() but... with a group :-)
This method will return an UNWRAPPED object

Definition at line 271 of file GRUFFolder.py.

00271 
00272     def _getGroup(self, id):
00273         """
00274         _getGroup(self, id) => same as getUser() but... with a group :-)
00275         This method will return an UNWRAPPED object
00276         """
00277         return self.acl_users.getUser(id)
00278 

def GroupUserFolder.GRUFFolder.GRUFFolder.getId (   self) [inherited]

Definition at line 93 of file GRUFFolder.py.

00093 
00094     def getId(self,):
00095         if self.id:
00096             return self.id
00097         else:
00098             return self.default_id      # Used for b/w compatibility

getUserFolder(self,) => get the underlying user folder, UNRESTRICTED !

Definition at line 118 of file GRUFFolder.py.

00118 
00119     def getUserFolder(self,):
00120         """
00121         getUserFolder(self,) => get the underlying user folder, UNRESTRICTED !
00122         """
00123         if not "acl_users" in self.objectIds():
00124             raise "ValueError", "Please put an acl_users in %s " \
00125                                 "before using GRUF" % (self.getId(),)
00126         return self.restrictedTraverse('acl_users')

getUserNames(self,) => None

We override this to prevent SimpleUserFolder to use GRUF's getUserNames() method.
It's, of course, still possible to override a getUserNames method with SimpleUserFolder:
just call it 'new_getUserNames'.

Definition at line 127 of file GRUFFolder.py.

00127 
00128     def getUserNames(self,):
00129         """
00130         getUserNames(self,) => None
00131 
00132         We override this to prevent SimpleUserFolder to use GRUF's getUserNames() method.
00133         It's, of course, still possible to override a getUserNames method with SimpleUserFolder:
00134         just call it 'new_getUserNames'.
00135         """
00136         # Call the "new_getUserNames" method if available
00137         if "new_getUserNames" in self.objectIds():
00138             return self.unrestrictedTraverse('new_getUserNames')()
00139 
00140         # Return () if nothing is there
00141         return ()
00142 
00143 
00144 

Here is the call graph for this function:

Definition at line 99 of file GRUFFolder.py.

00099 
00100     def getUserSourceId(self,):
00101         return self.getId()

Here is the caller graph for this function:

header_text(self,) => Text that appears in the content's
              view heading zone

Reimplemented from GroupUserFolder.GRUFFolder.GRUFFolder.

Definition at line 260 of file GRUFFolder.py.

00260 
00261     def header_text(self,):
00262         """
00263         header_text(self,) => Text that appears in the content's
00264                               view heading zone
00265         """
00266         ret = ""
00267         if not "acl_users" in self.objectIds():
00268             return "Please put an acl_users here before ever " \
00269                    "starting to use this object."
00270         return ret

Here is the call graph for this function:

isValid(self,) => Return true if an acl_users is inside

Definition at line 102 of file GRUFFolder.py.

00102 
00103     def isValid(self,):
00104         """
00105         isValid(self,) => Return true if an acl_users is inside
00106         """
00107         if "acl_users" in self.objectIds():
00108             return 1
00109         return None

Here is the call graph for this function:

def GroupUserFolder.GRUFFolder.GRUFGroups.listGroups (   self,
  prefixed = 1 
)
Return a list of available groups.
Group names are prefixed !

Definition at line 279 of file GRUFFolder.py.

00279 
00280     def listGroups(self, prefixed = 1):
00281         """
00282         Return a list of available groups.
00283         Group names are prefixed !
00284         """
00285         if not prefixed:
00286             return self.acl_users.getUserNames()
00287         else:
00288             ret = []
00289             for grp in self.acl_users.getUserNames():
00290                 ret.append("%s%s" % (self._group_prefix, grp))
00291             return ret
00292 

Here is the caller graph for this function:

Definition at line 293 of file GRUFFolder.py.

00293 
00294     def userdefined_roles(self):
00295         "Return list of user-defined roles"
00296         return self.listGroups()
00297 
00298 
00299 InitializeClass(GRUFUsers)
00300 InitializeClass(GRUFGroups)

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 257 of file GRUFFolder.py.

string GroupUserFolder.GRUFFolder.GRUFGroups._group_prefix = "group_" [static, private]

Definition at line 232 of file GRUFFolder.py.

Definition at line 230 of file GRUFFolder.py.

Definition at line 89 of file GRUFFolder.py.

Definition at line 78 of file GRUFFolder.py.

Definition at line 79 of file GRUFFolder.py.

tuple GroupUserFolder.GRUFFolder.GRUFFolder.manage_main = DTMLFile('dtml/GRUFFolder_main', globals()) [static, inherited]

Definition at line 80 of file GRUFFolder.py.

tuple GroupUserFolder.GRUFFolder.GRUFFolder.manage_options = ( {'label':'Contents', 'action':'manage_main'}, ) [static, inherited]

Reimplemented in GroupUserFolder.GRUFFolder.GRUFUsers.

Definition at line 81 of file GRUFFolder.py.

string GroupUserFolder.GRUFFolder.GRUFGroups.meta_type = "GRUFGroups" [static]

Definition at line 229 of file GRUFFolder.py.

tuple GroupUserFolder.GRUFFolder.GRUFFolder.security = ClassSecurityInfo() [static, inherited]

Definition at line 84 of file GRUFFolder.py.


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