[CORRUPTED] Synthetic Benchmark PR #25434 - fix: get bookings handler for pbac and fallback roles#662
Open
tomerqodo wants to merge 30 commits intobase_pr_25434_20260121_6310from
Open
Conversation
Co-Authored-By: sean@cal.com <Sean@brydon.io>
…ermission-org' into fix/getTeamIdsWithPermission-org
Co-Authored-By: sean@cal.com <Sean@brydon.io>
…row function Co-Authored-By: sean@cal.com <Sean@brydon.io>
Co-Authored-By: sean@cal.com <Sean@brydon.io>
Co-Authored-By: sean@cal.com <Sean@brydon.io>
|
Hey there and thank you for opening this pull request! 👋🏼 We require pull request titles to follow the Conventional Commits specification and it looks like your proposed title needs to be adjusted. Details: |
|
This PR has been marked as stale due to inactivity. If you're still working on it or need any help, please let us know or update the PR to keep it active. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Benchmark PR calcom#25434
Type: Corrupted (contains bugs)
Original PR Title: fix: get bookings handler for pbac and fallback roles
Original PR Description: ## What does this PR do?
This PR is stacked upon calcom#25387
Fixes the issue where PBAC/fallback roles were not taken into consideration correctly when calling get booking. The changes include:
get.handler.tsto usePermissionCheckServiceinstead of direct membership queriesorgIdparameter togetTeamIdsWithPermissionandgetTeamIdsWithPermissionsto properly scope results to the user's organizationPermissionRepositoryto filter teams by organization scopeorgIdfiltering functionalityUpdates since last revision
PermissionCheckServicemock to usefunction()instead of arrow function (required for proper constructor mocking in Vitest)scopedOrgIdparameter toorgIdfor consistencyMembershipRoleenum instead of hardcoded stringsVisual Demo (For contributors especially)
N/A - Backend logic changes only
Mandatory Tasks (DO NOT REMOVE)
How should this be tested?
TZ=UTC yarn vitest run packages/trpc/server/routers/viewer/bookings/get.handler.test.tsVITEST_MODE=integration yarn test packages/features/pbac/infrastructure/repositories/__tests__/PermissionRepository.integration-test.tsHuman Review Checklist
PermissionRepository.tscorrectly handle theorgIdfiltering (including null/undefined cases)function()instead of arrow function is the correct patternLink to Devin run: https://app.devin.ai/sessions/8454efaba8ea4ecdb672f6ec9bde2876
Requested by: sean@cal.com (@sean-brydon)
Original PR URL: calcom#25434