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

allow changing tenant on models using new without_tenant! block #210

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

Conversation

ksouthworth
Copy link

Allows changing the tenant_id column on a model if using a new without_tenant! block (destructive version of the existing without_tenant)

Related to #202

I had a need for this when building some admin screens in our app, where it's ok to allow certain users to change the tenant on existing models in specific cases.

@theianjones
Copy link

Any update on this one? We don't have a separate admin app currently and would love to be able to change the tenant of a model.

@ErwinM
Copy link
Owner

ErwinM commented Dec 23, 2019

Could you add some text to the readme describing this change?

@CR1AT0RS
Copy link

CR1AT0RS commented Oct 7, 2020

Any updates on this? Bumping this up.

@excid3
Copy link
Collaborator

excid3 commented Nov 17, 2020

Same as #230, I'd like to probably have a different method name for this since it does more than just removing the current tenant temporarily.

@murugan-r
Copy link
Contributor

@ksouthworth Just a thought, with the new addition of tenant_modified? method here, we can achieve the without tenant functionality by overriding the tenant_modified? method in model.

cc: @ErwinM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants