Skip to content

Recognize the endpoint editor role as the write tier - #237

Merged
rbardaji merged 1 commit into
mainfrom
fix/accept-editor-as-writer
Aug 12, 2026
Merged

Recognize the endpoint editor role as the write tier#237
rbardaji merged 1 commit into
mainfrom
fix/accept-editor-as-writer

Conversation

@rbardaji

Copy link
Copy Markdown
Collaborator

Closes #236

Problem

The write-operation gate recognized the write tier only through ndp_writer and group:{ep}:writer. But the identity provider and the platform name that tier editor, not writer — the roles it issues are group:ndp_ep/ep-{id}:editor, and the per-endpoint permission levels created for a client are admins/editors/viewers (verified against a token and against a client created through the new /client/create).

So a user who is an editor of an endpoint was denied create, update and delete, even though the role is meant to grant exactly that. Administrators were unaffected; only the middle tier was blocked.

Fix

is_writer now accepts ndp_editor and group:{ep}:editor alongside the writer forms. Additive — nothing previously allowed is removed.

Verified

New tests/test_editor_is_writer.py uses the exact emitted role group:ndp_ep/ep-{id}:editor: an editor resolves to is_writer true / effective_role writer, a platform ndp_editor is a writer, and a plain viewer is still not. Full suite 1212 passed; black/flake8 clean.

Context: this is the ep-api side of the viewer/writer/admin vs viewer/editor/admin naming — the platform uses editor, so ep-api accepts it.

The write-operation gate accepted the write tier only through ndp_writer
and group:{ep}:writer, but the identity provider and the platform name
that tier editor, not writer: the roles it issues are
group:ndp_ep/ep-{id}:editor and the per-endpoint permission levels are
admins/editors/viewers. So an editor of an endpoint was denied create,
update and delete, though the role is meant to grant exactly that.
Administrators were unaffected, so only the middle tier was blocked.

is_writer now accepts ndp_editor and group:{ep}:editor alongside the
writer forms. Additive — nothing that was allowed before is removed.

Closes #236
@rbardaji
rbardaji merged commit 3eb75c8 into main Aug 12, 2026
1 check passed
@rbardaji
rbardaji deleted the fix/accept-editor-as-writer branch August 12, 2026 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Endpoint editors cannot write: the writer tier does not accept the editor role

1 participant