fix(app-store): preserve delegation fields on user path of getLocationGroupedOptions (#29898) - #30094
fix(app-store): preserve delegation fields on user path of getLocationGroupedOptions (#29898)#30094Aj2280 wants to merge 1 commit into
Conversation
…nGroupedOptions (calcom#29898) - Remove premature buildNonDelegationCredentials call inside PrismaCredentialRepository.findNonDelegationCredentialsByAppCategories - Explicitly apply buildNonDelegationCredentials only on the non-user (team) branch of getLocationGroupedOptions - Add unit tests for PrismaCredentialRepository and getLocationGroupedOptions fixes: calcom#29898
|
Welcome to Cal.diy, @Aj2280! Thanks for opening this pull request. A few things to keep in mind:
A maintainer will review your PR soon. Thanks for contributing! |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe repository now returns raw credential rows so Merge Risk: ⚪ Minimal · up to Delegated user credentials retain their linkage for enrichment, while team and organization credentials continue to be normalized before app lookup. The change is covered for both paths and is ready to merge. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
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. Comment |
Description
PR #29724 moved the credential query out of
getLocationGroupedOptionsintoPrismaCredentialRepository.findNonDelegationCredentialsByAppCategories. However, it also movedbuildNonDelegationCredentialsinside the repository method, which unconditionally nulled delegation fields on all returned credentials.This caused the user branch of
getLocationGroupedOptionsto also receive nulled delegation fields before callingenrichUserWithDelegationConferencingCredentialsWithoutOrgId.This PR:
PrismaCredentialRepository.findNonDelegationCredentialsByAppCategoriesas stored.buildNonDelegationCredentialsonly on the non-user (team/org) branch ofgetLocationGroupedOptions.PrismaCredentialRepositoryandgetLocationGroupedOptions.Fixes: #29898