feat(services): org-admin curated service catalogs + hard instantiation gate#435
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
f945786 to
a9a4fe7
Compare
…on gate
Org admins can already restrict the global template catalog to a curated
allow-list (`global_templates_enabled` + `enabled_global_templates`), but it
had no dashboard UI and was only enforced on discovery surfaces — a caller who
knew a curated-out key could still instantiate it.
Backend:
- New per-org `allow_services_outside_catalog` flag (migration 092, default
false). When false, non-admins get 403 creating a service from a global
template outside the curated catalog; when true, curated-out globals stay
hidden from discovery but remain instantiable. Admins are always exempt.
- Enforce at instantiation in `kernel_create_service`, reusing the same
allow-list filter as discovery (`is_global_curated_out`) so the two can't
diverge.
- Add `GET /v1/orgs/{id}/template-settings` (was PATCH-only) and thread the new
flag through the PATCH request/response, repo accessors, and audit detail.
Dashboard:
- Org Settings gains a "Service catalog" card with three toggles (make all
global services available, allow services outside the curated catalog, allow
user-defined templates).
- Services → Catalog gains an admin-only per-global enable/disable curation
grid backed by `/v1/templates/admin`, active only in curated mode.
Tests + scenarios: integration coverage for the 403/soft/admin-exempt matrix
and settings round-trip; a real-stack screenshot script for both surfaces.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
a9a4fe7 to
4cb6347
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Overslash already had the backend primitives to curate the global service-template catalog per org (
orgs.global_templates_enabled+ theenabled_global_templatesallow-list), but they had no dashboard UI and were only enforced on discovery surfaces — a caller who knew a curated-out template key could still instantiate a service from it. This PR turns catalog curation into a real, admin-managed feature and makes it a hard restriction.Backend
allow_services_outside_catalog(migration092, defaultfalse).false(default) → hard: non-admins get403when creating a service from a global template outside the curated catalog.true→ soft: curated-out globals stay hidden from discovery but remain instantiable.kernel_create_service, reusing the same allow-list filter as discovery (is_global_curated_out) so the enforced set and the hidden set can never diverge.GET /v1/orgs/{id}/template-settingsadded (was PATCH-only) so the dashboard can read current state; the new flag is threaded through the PATCH request/response, repo accessors, and auditdetail.Dashboard
CATALOGcolumn) backed byGET /v1/templates/admin, active only when the org is in curated mode.Tests
403on curated-out global, non-admin success on curated-in global, admin exemption, and soft-mode allow.dashboard/scripts/screenshot-curated-catalog.mjs) built on the scenarios library.Screenshots
Org Settings → Service catalog (curated mode):
Services → Catalog curation grid (GitHub + Slack curated in, rest curated out):
Verification
cargo test -p overslash-api --test templates— 25 passed (incl. 4 new curation tests).cargo clippy,cargo fmt --check,svelte-check, dashboard strict build — all clean (pre-commit hook).make e2e-up) + screenshot script exercised both dashboard surfaces and the settings PATCH round-trip.🤖 Generated with Claude Code