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

Have Eloquent scopes and observers skip certain functionality when not within multitenanted context #65

Closed
ollieread opened this issue Nov 18, 2024 · 0 comments · Fixed by #66
Assignees
Labels
status: accepted The issue has been accepted/acknowledged and is being actioned or will be type: fix Fix for a bug or other issue
Milestone

Comments

@ollieread
Copy link
Member

The scopes and observers added by BelongsToTenant and BelongsToManyTenants will throw exceptions at various points during the usage of the models that use them. These exceptions, currently, will be thrown while outside multitenanted context, which means that the models can't be used in any sort of admin area.

Both scopes should exit early from within Scope::apply() if the current request isn't marked as being within multitenanted context. Both observers should also exit early for all operations when outside multitenanted context.

@ollieread ollieread self-assigned this Nov 18, 2024
@ollieread ollieread converted this from a draft issue Nov 18, 2024
@ollieread ollieread added type: fix Fix for a bug or other issue status: accepted The issue has been accepted/acknowledged and is being actioned or will be labels Nov 18, 2024
@ollieread ollieread added this to the V1 Release milestone Nov 18, 2024
@github-project-automation github-project-automation bot moved this from Ready to Done in Sprout Development Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: accepted The issue has been accepted/acknowledged and is being actioned or will be type: fix Fix for a bug or other issue
Projects
Status: Done
1 participant