예제 #1
0
 def getItems(self):
     group_ids = self.store.get(GROUP_STORE_KEY, set())
     if group_ids:
         access = IAuthorizationManager(self.context)
         authorizations = access.get_authorizations(group_ids).items()
         authorizations.sort(key=operator.itemgetter(0))
         return filter(lambda auth: auth.type == 'group',
                       map(operator.itemgetter(1), authorizations))
     return []