コード例 #1
0
ファイル: groups.py プロジェクト: Gagaro/Products.membrane
 def getGroupsForPrincipal(self, principal, request=None):
     groups = {}
     # Get all BRefs that implement IGroup - slightly expensive
     for obj in self.context.getBRefs():
         group = IGroup(obj, None)
         if group is not None:
             groups[group.getGroupId()] = 1
     for parent in aq_chain(aq_inner(self.context)):
         group = IGroup(parent, None)
         if group is not None:
             groups[group.getGroupId()] = 1
     return tuple(groups.keys())
コード例 #2
0
 def getGroupsForPrincipal(self, principal, request=None):
     groups = {}
     # Get all BRefs that implement IGroup - slightly expensive
     for obj in self.context.getBRefs():
         group = IGroup(obj, None)
         if group is not None:
             groups[group.getGroupId()] = 1
     for parent in aq_chain(aq_inner(self.context)):
         group = IGroup(parent, None)
         if group is not None:
             groups[group.getGroupId()] = 1
     return tuple(groups.keys())
コード例 #3
0
ファイル: groups.py プロジェクト: Gagaro/Products.membrane
 def getGroupsForPrincipal(self, principal, request=None):
     groups = {}
     for relationship in self.context.getGroupRelationships():
         groups.update(dict.fromkeys([g.getUserId() for g in
                                      self.context.getBRefs(relationship)]))
     for parent in aq_chain(aq_inner(self.context)):
         group = IGroup(parent, None)
         if group is not None:
             groups[group.getGroupId()] = 1
     return tuple(groups.keys())
コード例 #4
0
ファイル: groups.py プロジェクト: vedantc98/Plone-test
 def getGroupsForPrincipal(self, principal, request=None):
     groups = {}
     for relationship in self.context.getGroupRelationships():
         groups.update(dict.fromkeys([g.getUserId() for g in
                                      self.context.getBRefs(relationship)]))
     for parent in aq_chain(aq_inner(self.context)):
         group = IGroup(parent, None)
         if group is not None:
             groups[group.getGroupId()] = 1
     return tuple(groups.keys())
コード例 #5
0
ファイル: catalog.py プロジェクト: Gagaro/Products.membrane
def getGroupId(obj):
    obj = IGroup(obj, None)
    if obj is None:
        return None
    return obj.getGroupId()
コード例 #6
0
def getGroupId(obj):
    obj = IGroup(obj, None)
    if obj is None:
        return None
    return obj.getGroupId()