def METHOD_NAME(self, user_obj):
    """
    Return all permissions granted to the user by an ObjectPermission.
    """
    # Retrieve all assigned and enabled ObjectPermissions
    object_permissions = ObjectPermission.objects.filter(
        Q(users=user_obj) | Q(groups__user=user_obj), enabled=True
    ).prefetch_related("object_types")
    # Create a dictionary mapping permissions to their constraints
    perms = defaultdict(list)
    for obj_perm in object_permissions:
        for object_type in obj_perm.object_types.all():
            for action in obj_perm.actions:
                perm_name = f"{object_type.app_label}.{action}_{object_type.model}"
                perms[perm_name].extend(obj_perm.list_constraints())
    return perms