Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Restrict eloquent scope and observer functionality based on multitenanted context #66

Merged
merged 5 commits into from
Nov 18, 2024

Conversation

ollieread
Copy link
Member

This PR addresses #65 by having all the tenant-child scopes and observers exit only if outside multitenanted context.

Copy link

codecov bot commented Nov 18, 2024

Codecov Report

Attention: Patch coverage is 92.85714% with 1 line in your changes missing coverage. Please review.

Project coverage is 86.24%. Comparing base (2abfc25) to head (0a39cd4).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/Database/Eloquent/Scopes/TenantChildScope.php 50.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main      #66      +/-   ##
============================================
- Coverage     86.80%   86.24%   -0.56%     
- Complexity      379      386       +7     
============================================
  Files            57       57              
  Lines          1091     1105      +14     
============================================
+ Hits            947      953       +6     
- Misses          144      152       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ollieread ollieread merged commit 76e7810 into main Nov 18, 2024
3 of 4 checks passed
@ollieread ollieread deleted the fix/eloquent-multitenanted-context branch November 18, 2024 10:32
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.

Have Eloquent scopes and observers skip certain functionality when not within multitenanted context
1 participant