Logo Search packages:      
Sourcecode: zope-groupuserfolder version File versions

def zope-groupuserfolder-3.1.1::GRUFUser::GRUFUserAtom::getGroupRoles (   self  ) 

Return the tuple of roles belonging to this user's group(s)

Definition at line 302 of file GRUFUser.py.

00302                             :
        """
        Return the tuple of roles belonging to this user's group(s)
        """
        if self._group_roles is not None:
            return self._group_roles
        ret = []
        acl_users = self._GRUF.acl_users 
        groups = acl_users.getGroupIds()      # XXX We can have a cache here
        
        for group in self.getGroups():
            if not group in groups:
                Log("Group", group, "is invalid. Ignoring.")
                # This may occur when groups are deleted
                # Ignored silently
                continue
            ret.extend(acl_users.getGroup(group).getUserRoles())

        self._group_roles = GroupUserFolder.unique(ret)
        return self._group_roles

    security.declarePublic('getRolesInContext')
    def getRolesInContext(self, object, userid = None):


Generated by  Doxygen 1.6.0   Back to index