Skip to content

fix(web): Fix issue with userScopedPrismaClientExtension#1260

Merged
brendan-kellam merged 2 commits into
v5from
bkellam/fix-SOU-1242
Jun 2, 2026
Merged

fix(web): Fix issue with userScopedPrismaClientExtension#1260
brendan-kellam merged 2 commits into
v5from
bkellam/fix-SOU-1242

Conversation

@brendan-kellam
Copy link
Copy Markdown
Contributor

@brendan-kellam brendan-kellam commented Jun 1, 2026

Summary by CodeRabbit

  • Bug Fixes
    • Enhanced repository permission enforcement for search operations to ensure proper access control across all query types.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 1, 2026

Review Change Stack

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7f6f0813-4794-4f16-ad34-37e5efccc1c4

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

Walkthrough

The PR extends Prisma client scoping to enforce repository permissions on searchContext operations. A new searchContext.$allOperations handler invokes injectRepoPermissionFilterIntoRelation to inject the repo permission filter into nested repos relations found in query include/select arguments, normalizing boolean selects to object form and merging filters with existing where clauses.

Changes

SearchContext Permission Scoping

Layer / File(s) Summary
SearchContext permission filter injection
packages/web/src/prisma.ts
Adds searchContext.$allOperations handler and injectRepoPermissionFilterIntoRelation utility to normalize nested repos: true selects into object form and merge the repo permission filter into repos.where, extending existing repo permission scoping behavior to searchContext operations.

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'fix(web): Fix issue with userScopedPrismaClientExtension' is vague and generic. It uses the redundant phrase 'Fix issue with' which provides minimal descriptive information about what was actually fixed. Revise the title to be more specific about the actual change, such as 'fix(web): Scope Prisma searchContext operations with repository permissions' to clearly describe what was improved.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch bkellam/fix-SOU-1242

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.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 1, 2026

@brendan-kellam your pull request is missing a changelog!

@brendan-kellam
Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 1, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

1 similar comment
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 1, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@brendan-kellam brendan-kellam merged commit 4e8d389 into v5 Jun 2, 2026
2 checks passed
@brendan-kellam brendan-kellam deleted the bkellam/fix-SOU-1242 branch June 2, 2026 22:26
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.

2 participants