code: def group_permissions(self, group, perm, obj, approved=True):
          
          return self.get_for_model(obj).select_related(
              'user', 'group', 'creator').filter(group=group, codename=perm,
                                                 approved=approved)
docs: Get objects that have Group perm permission on