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

Pass ar_relation to should_require_tenant? for improved control #349

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ikraamg
Copy link

@ikraamg ikraamg commented Jan 16, 2025

Enhance the should_require_tenant? method to accept a context parameter, allowing for more granular control over tenant requirements.

This change maintains backward compatibility while enabling the evaluation of conditions based on the provided on the ar_relation object.

@ikraamg ikraamg force-pushed the Pass-the-ar-relation-for-context-to-should_require_tenant branch from 3a1c678 to a59c5d9 Compare January 16, 2025 13:31
@ikraamg ikraamg marked this pull request as ready for review January 16, 2025 13:32
@ikraamg ikraamg changed the title Pass context to should_require_tenant? for improved control Pass ar_relation to should_require_tenant? for improved control Jan 16, 2025
@ikraamg ikraamg force-pushed the Pass-the-ar-relation-for-context-to-should_require_tenant branch from a59c5d9 to 3b5b9d0 Compare January 16, 2025 13:39
This is a backwards compatible addition that allows finer control over when
`ActsAsTenant::Errors::NoTenantSet` is raised in the default scope check.
@ikraamg ikraamg force-pushed the Pass-the-ar-relation-for-context-to-should_require_tenant branch from 3b5b9d0 to 530effc Compare January 16, 2025 13:41
@ikraamg
Copy link
Author

ikraamg commented Jan 24, 2025

Hey @excid3, lovely to be in contact!

Could you please take a peek at this when you have some time 🙏

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.

1 participant