Skip to content

fix(api): allow maintainer settings preview sessions - #513

Merged
JSONbored merged 1 commit into
mainfrom
codex/fix-maintainer-preview-endpoint-authorization
Jun 10, 2026
Merged

fix(api): allow maintainer settings preview sessions#513
JSONbored merged 1 commit into
mainfrom
codex/fix-maintainer-preview-endpoint-authorization

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Motivation

  • The maintainer UI posts settings preview requests to /v1/repos/:owner/:repo/settings-preview using the browser session cookie, but the global session gate only allowed /v1/app/*, causing legitimate maintainer sessions to receive 403 and the feature to fail.

Description

  • The POST /v1/repos/:owner/:repo/settings-preview route now authenticates the request identity and enforces repository-scoped access for session identities via requireSessionRepoAccess, while leaving static API-token usage unchanged.
  • The global session path allowlist (canSessionAccessPath) was extended to permit the settings preview path by adding an isRepoSettingsPreviewPath helper.
  • An integration test was added to test/integration/api.test.ts to verify a maintainer/owner session can preview its owned repo and is forbidden from previewing unrelated repos.

Testing

  • Ran the integration tests with npm test -- test/integration/api.test.ts, which completed successfully (33 tests passed).
  • Ran the TypeScript check with npm run typecheck, which completed without type errors.

Codex Task

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 9, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
gittensory-ui 0861bee Commit Preview URL

Branch Preview URL
Jun 10 2026, 08:31 AM

@github-actions github-actions Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jun 9, 2026
@ghost

ghost commented Jun 9, 2026

Copy link
Copy Markdown

Note

Gittensory Gate skipped

PR closed before full evaluation. No late first comment was created.

Signal Result Evidence Action
Gate result ⚠️ Skipped #513 is no longer open. No action.

Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.

@ghost ghost added the gittensory:reviewed label Jun 9, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@JSONbored
JSONbored force-pushed the codex/fix-maintainer-preview-endpoint-authorization branch from 771d8eb to 0861bee Compare June 10, 2026 08:30
@JSONbored
JSONbored merged commit 3513403 into main Jun 10, 2026
10 checks passed
@JSONbored
JSONbored deleted the codex/fix-maintainer-preview-endpoint-authorization branch June 10, 2026 08:34
@github-project-automation github-project-automation Bot moved this from Todo to Done in gittensory - v1 roadmap Jun 10, 2026
@JSONbored JSONbored added the gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. label Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant