Skip to content

feat(add): updated team management#32

Merged
CodeMeAPixel merged 1 commit into
mainfrom
develop
Jun 24, 2026
Merged

feat(add): updated team management#32
CodeMeAPixel merged 1 commit into
mainfrom
develop

Conversation

@CodeMeAPixel

@CodeMeAPixel CodeMeAPixel commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

Describe what changed and why.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Chore / maintenance

Testing

List what you ran:

  • pnpm lint
  • pnpm build
  • Relevant tests for changed area

Commands/results:

Paste test output or brief notes here.

Screenshots / Evidence (if applicable)

Add screenshots, recordings, or logs.

Checklist

  • I linked related issue(s)
  • I updated docs where needed
  • I updated changelog for user-facing changes
  • I removed secrets from code, logs, and screenshots

Summary by CodeRabbit

  • New Features

    • Added automatic redirect to a banned-access page when sign-in detects a banned account.
  • Bug Fixes

    • Blocked teams are now consistently denied access across all email-limit checks and API authentication paths.
    • Team settings and plan changes now refresh immediately, reducing stale data after admin updates.
  • Documentation

    • Removed the AWS credentials setup guide from the getting-started docs.

@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 3e29acb4-3dff-4aaf-900c-2b3411d63646

📥 Commits

Reviewing files that changed from the base of the PR and between 757dbfa and c0ac3b7.

📒 Files selected for processing (5)
  • apps/docs/get-started/create-aws-credentials.mdx
  • apps/web/src/app/login/page.tsx
  • apps/web/src/server/api/routers/admin.ts
  • apps/web/src/server/public-api/auth.ts
  • apps/web/src/server/service/limit-service.ts

Walkthrough

Team blocking is now enforced in three places: the public API auth guard throws FORBIDDEN for blocked teams, LimitService.checkEmailLimit moves the isBlocked check before all cloud-mode and exemption logic, and the login page redirects to /banned when searchParams.error === "banned". The admin router also gains TeamService.invalidateTeamCache calls after updateTeamSettings and adminAssignPlan mutations.

Changes

Team Blocking Enforcement and Admin Cache Invalidation

Layer / File(s) Summary
isBlocked guard in public API auth and email limit check
apps/web/src/server/public-api/auth.ts, apps/web/src/server/service/limit-service.ts
getTeamFromToken throws FORBIDDEN when team.isBlocked. checkEmailLimit moves team fetch and isBlocked early return before all cloud-mode gating and admin/founder exemptions so blocked teams are rejected in every deployment mode.
Login page banned redirect
apps/web/src/app/login/page.tsx
Login accepts searchParams as a Promise, concurrently awaits it with the auth session, and redirects to /banned when error === "banned", in addition to the existing /dashboard redirect.
Team cache invalidation after admin mutations
apps/web/src/server/api/routers/admin.ts
Imports TeamService and calls invalidateTeamCache(teamId) after updateTeamSettings and after the complimentary plan branch in adminAssignPlan.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch develop

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed due to a network error.


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.

@CodeMeAPixel CodeMeAPixel merged commit c23c303 into main Jun 24, 2026
14 of 17 checks passed
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