Skip to content

feat: add preflight-checks endpoint for autofix deploy permission validation#2119

Open
FentPams wants to merge 8 commits intomainfrom
permission-checks
Open

feat: add preflight-checks endpoint for autofix deploy permission validation#2119
FentPams wants to merge 8 commits intomainfrom
permission-checks

Conversation

@FentPams
Copy link
Copy Markdown
Contributor

@FentPams FentPams commented Apr 3, 2026

Adds POST /sites/:siteId/preflight-checks — a generic, extensible endpoint that runs server-side permission and capability checks before autofix deploy. The UI cannot probe AEM Author directly (CORS), so this proxies the check through SpaceCat using the user's IMS token.

Initial handler: content-api-access — probes AEM Author Content API with the user's Bearer token and returns granular status (PASSED/FAILED with reason).

Please ensure your pull request adheres to the following guidelines:

  • make sure to link the related issues in this description. Or if there's no issue created, make sure you
    describe here the problem you're solving.
  • when merging / squashing, make sure the fixed issue references are visible in the commits, for easy compilation of release notes

If the PR is changing the API specification:

  • make sure you add a "Not implemented yet" note the endpoint description, if the implementation is not ready
    yet. Ideally, return a 501 status code with a message explaining the feature is not implemented yet.
  • make sure you add at least one example of the request and response.

If the PR is changing the API implementation or an entity exposed through the API:

  • make sure you update the API specification and the examples to reflect the changes.

If the PR is introducing a new audit type:

  • make sure you update the API specification with the type, schema of the audit result and an example

Related Issues

Thanks for contributing!

…idation

Adds POST /sites/:siteId/preflight-checks — a generic, extensible endpoint
that runs server-side permission and capability checks before autofix deploy.
The UI cannot probe AEM Author directly (CORS), so this proxies the check
through SpaceCat using the user's IMS token.

Initial handler: content-api-access — probes AEM Author Content API with the
user's Bearer token and returns granular status (PASSED/FAILED with reason).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@FentPams FentPams requested a review from ravkiran April 3, 2026 00:07
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@rpapani rpapani requested review from rpapani and removed request for ravkiran April 3, 2026 05:03
Copy link
Copy Markdown
Contributor

@rpapani rpapani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please check the feedback

…utofix-checks

- Resolve merge conflicts with origin/main (ephemeral-run controller additions)
- Fix import path for autofix-checks controller in src/index.js
- Add code-repo-access handler and tests
- Update route to POST /sites/:siteId/autofix-checks

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 6, 2026

This PR will trigger a minor release when merged.

@FentPams FentPams requested a review from rpapani April 6, 2026 20:37
FentPams and others added 6 commits April 6, 2026 14:32
Aligns variable and import names with the autofix-checks file rename.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

3 participants