Skip to content

Non-super users get UNAUTHORISED on every PATCH/DELETE #115

Description

@taylortom

On any access-controlled collection (assets, content, users, …), a non-super user's PATCH or DELETE always fails with UNAUTHORISED — even for a resource they can see in the list and own, or that is public.

The per-item access check in AbstractApiModule.requestHandler is invoked with the Mongo query rather than the target document, so accessCheckHook grants — which read document fields like _access and createdBy — can never match. Super users are unaffected because they bypass the check.

Introduced by the _access unification (#108, api 4.0.0).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status
    Merged

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions