Skip to content

[BUG] Missing Validation in Lookup Subject #1390

@tolgaozen

Description

@tolgaozen

Description:
When the request is structured as shown below, it returns an empty result instead of a validation error:

{
    "metadata": {
        "depth": 30,
        "schema_version": ""
    },
    "entity": {"type": "patient", "id": "x"},
    "permission": "view",
    "subject": "user"
}

However, the correct request format is:

{
    "metadata": {
        "depth": 30,
        "schema_version": ""
    },
    "entity": {"type": "patient", "id": "x"},
    "permission": "view",
    "subject_reference": {
        "type": "user",
        "relation": ""
    }
}

Expected Behavior:
The Permify should return a validation error when the subject field is incorrectly formatted, instead of returning an empty result.

Permify version: v0.10.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSometing isn't workinggood first issueNewcomers could handle this

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions