def get_all_permissions(self, obj=None):
        """
        Returns the permissions a user is granted by his group membership(s).

        Try to return the permissions for the 'Anonymous' group (pk=1).
        """
        perms = Permission.objects.filter(group__pk=1)
        if perms is None:
            return set()
        # TODO: Test without order_by()
        perms = perms.values_list('content_type__app_label', 'codename').order_by()
        return set(['%s.%s' % (content_type, codename) for content_type, codename in perms])
dataset/ETHPy150Open OpenSlides/OpenSlides/openslides/users/auth.py/AnonymousUser.get_all_permissions/original