def get_acl_by_object(self, object, permission):
        allowed_groups = self.get_acl_groups_by_object(object, permission)
        if defines.ZORNA_GROUP_PUBLIC in allowed_groups or defines.ZORNA_GROUP_REGISTERED in allowed_groups:
            members = User.objects.filter(
                is_active=1).order_by('first_name', 'last_name')
        else:
            ct = ContentType.objects.get_for_model(object)
            members = User.objects.filter(Q(user_profile__groups__in=allowed_groups) | Q(
                aclpermission__permission__codename=permission, aclpermission__content_type=ct, aclpermission__object_id=object.pk)).distinct().order_by('first_name', 'last_name')
        return members
return list of users that have access to object on "permission" permission ( explicitly or from groups )
dataset/ETHPy150Open zorna/zorna/zorna/acl/models.py/ACLPermissionManager.get_acl_by_object