Skip to content

fix(api): fetch plugin metadata via permission-scoped processing endpoint#102

Merged
albanm merged 6 commits into
masterfrom
fix-permission-transitivity
Jun 1, 2026
Merged

fix(api): fetch plugin metadata via permission-scoped processing endpoint#102
albanm merged 6 commits into
masterfrom
fix-permission-transitivity

Conversation

@albanm
Copy link
Copy Markdown
Member

@albanm albanm commented Jun 1, 2026

Add GET /api/v1/processings/:id/plugin, which returns a processing's plugin registry metadata. The endpoint checks the caller's permission on the processing (admin/exec/read), then fetches the artefact from the private registry as the processing owner — so a user holding only an individual permission inherits the owner's plugin access without needing their own registry grant. The UI now reads plugin metadata (cards + detail page) through this endpoint instead of calling /registry directly.

Why: a user can be granted an individual read/exec permission on a processing they don't own; requiring their own registry grant to view the plugin broke that case. Permission on the processing should transitively cover its plugin metadata.

Regression risks:

  • usePluginFetch now takes a processingId instead of a pluginId and its module-level fetch cache is re-keyed accordingly; the only caller (processing-card.vue) is updated.
  • Plugin metadata now flows through the processings API (extra hop, fetched as owner) rather than a direct same-origin /registry call. The creation/picker flows (new.vue, processings-actions.vue) intentionally keep the direct /registry list call.
  • Registry 403/404 are translated to French messages and passed through (UI shows its "plugin broken" banner); any other registry failure becomes 502.

albanm and others added 6 commits June 1, 2026 14:37
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added the fix label Jun 1, 2026
@albanm albanm merged commit 06fda3f into master Jun 1, 2026
4 checks passed
@albanm albanm deleted the fix-permission-transitivity branch June 1, 2026 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant