Skip to content

[finding] a refused POST /automation/:name/toggle is told "Authoring automation flows requires …" — the shared deny message names a verb the caller did not use #11666

Description

@os-zhuang

Raised by the dev seat on #10243 / PR #11660 as an open question, and filed here rather than ridden
into that PR: it is a user-visible copy change the maintainer's ruling did not ask for, and the
ruling was specifically "one predicate, no new capability name". Filed unassigned.

What a caller sees after #10243

POST /api/v1/automation/:name/toggle now requires manage_metadata (maintainer ruling on #10243,
option A). A caller without it is refused with the shared constant:

Authoring automation flows requires the \manage_metadata` capability.`

They were disabling a flow, not authoring one. The sentence is accurate about the policy — the
ruling classified toggle into the authoring write set — but it names a verb the caller did not use.

Why it was not fixed in #11660, and why that was right

The shape, if this is graded as work

The dev seat laid out three and recommended keeping A for that PR:

optioncost
Akeep the single shared message (shipped in #11660)zero; one predicate, one refusal vocabulary
Ba toggle-specific sentence with the same code and statusone constant + one arm in refuseUngrantedFlowWrite
Creword the shared message to cover both ("Authoring or enabling …")one edit, but slightly degrades the message for the three definition writes

B has an in-domain precedent one screen over: SCREEN_READ_DENY_MESSAGE sits beside
RUN_READ_DENY_MESSAGE in this very file (#7968) — a different question asked, a different sentence
returned. That is the argument for B being the long-term shape rather than a nicety.

⛔ Whichever way this is graded, the code and status must not move. PERMISSION_DENIED / 403 is
what #11660's pins and the ADR-0112 vocabulary assert; only the human-readable prose is in question.

Related

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions