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

Tenant Relationship Handling #31

Closed
2 of 6 tasks
ollieread opened this issue Sep 10, 2024 · 0 comments · Fixed by #32
Closed
2 of 6 tasks

Tenant Relationship Handling #31

ollieread opened this issue Sep 10, 2024 · 0 comments · Fixed by #32
Assignees
Labels
type: feat New feature
Milestone

Comments

@ollieread
Copy link
Member

ollieread commented Sep 10, 2024

Handle the different types of relationships that Laravel supports

  • Belongs To
  • Belongs To Many
  • Has One
  • Has Many
  • Has One Through
  • Has Many Through
@ollieread ollieread self-assigned this Sep 10, 2024
@ollieread ollieread converted this from a draft issue Sep 10, 2024
@ollieread ollieread added the type: feat New feature label Sep 10, 2024
@ollieread ollieread added this to the V1 Release milestone Sep 10, 2024
ollieread added a commit that referenced this issue Sep 24, 2024
* chore: Add basic hydration options to default tenancy
* chore: Add attribute for marking method as a tenant relation
* refactor: Rename IsTenantModel to IsTenant
* chore: Add contract/interface for tenant relation handlers
* chore: Add a base abstract tenant relation handler for common functionality
* fix: Set the tenancy current resolver to null as default
* feat(database.eloquent): Add belongs to tenant relation handler
* feat(database.eloquent): Add belongs to many tenants relation handler
* refactor: Abstract out tenancy options for hydration to flag class
* chore: Current state of tenant child trait and has one/main handlers
* test(database.eloquent): Testing for initial working tenant relation handlers
* refactor: Removed Eloquent relation handler contract, implementations and tests
* refactor: Tidied up tenancy options and updated typings for them
* refactor: Create simple observer and base scope for belongsTo and belongsToMany relations
* test: Add some tests for the initial trait functionality
* refactor: Remove unused abstract tenant relation handler
* feat: Complete single-database support
* test: Fix observer tests to not throw exception when models not related to current tenant
* refactor: Add a manual override for tenant restrictions to child models
* refactor: Remove untestable and unnecessary code from belongs to many tenants observer
* feat: Add method for temporarily disabling tenant restrictions

Completes: #29 #30 #31
@github-project-automation github-project-automation bot moved this from In progress to Done in Sprout Development Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feat New feature
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant