Skip to content

CONV-298: Enforce API access feature gate#258

Merged
menvil merged 1 commit into
developfrom
feature/CONV-298-enforce-api-access-feature-gate
Jun 3, 2026
Merged

CONV-298: Enforce API access feature gate#258
menvil merged 1 commit into
developfrom
feature/CONV-298-enforce-api-access-feature-gate

Conversation

@menvil

@menvil menvil commented Jun 3, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds EnsureApiAccessIsAllowed middleware that calls FeatureAccessService::allows($user, 'api_access')
  • Free plan users get 403 api_not_available; Pro/Max users pass through
  • Registers api.access alias in bootstrap/app.php
  • Protected routes use ['api.key', 'api.access'] middleware stack

Test plan

  • Free user with valid API key → 403 api_not_available
  • Pro user → 200 OK
  • Max user → 200 OK
  • composer test passes (549 tests)
  • composer lint passes

🤖 Generated with Claude Code


Summary by cubic

Implements CONV-298 by enforcing the API access feature gate on protected endpoints. Free plan users get a 403 api_not_available; Pro/Max users can proceed.

  • New Features
    • Added EnsureApiAccessIsAllowed middleware and api.access alias.
    • Applied ['api.key', 'api.access'] to protected routes.
    • Returns 403 via ApiErrorResponseFactory with code api_not_available.
    • Added feature tests for Free, Pro, and Max plans.

Written for commit ce08166. Summary will update on new commits.

Review in cubic

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@menvil menvil merged commit d3b9f75 into develop Jun 3, 2026
1 check was pending
@coderabbitai

coderabbitai Bot commented Jun 3, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • release

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 6736677f-73c3-42c7-9033-7cbf35cad15b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/CONV-298-enforce-api-access-feature-gate

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant