User can access everything (admin)
lucasazuma opened this issue · 1 comments
lucasazuma commented
I have a problem with creating and updating in my controller.In my website users have roles, everybody BUT the admin belongs to a county, so my tenant is defined by the county. When I try to create or update an instance who has the act_as tenant i need to define a county, i wanna know which is better, using a before_action in the create and update methods in, or using a before_create in the model, in order to set the current_tenant
fidalgo commented
Isn't this a case to use without_tenant
ActsAsTenant.without_tenant do
# Tenant checking is disabled for all code in this block
end
as mentioned here: https://github.com/ErwinM/acts_as_tenant#disabling-tenant-checking-for-a-block