This project is read-only.

Orchard admin users and multi tenancy

Topics: Administration, Francais (French), General
Feb 4, 2014 at 9:08 PM
Edited Feb 4, 2014 at 9:14 PM
I would like to setup Orchard with multiple tenants and have an admin account that is bound to a specific tenant. Therefore I have done the following:

1) Create the default tenant with an 'admin' user
2) Created a tenant with an admin user called 'admintenant'

I can log into the site and perform all administrative tasks using the 'admin' user but any attempt to log in using the admin user 'admintenant' fail.

It also appears that when I move to the tenant admin, I now am logged in as the 'admintenant' user despite having not performed a login.

Is this a bug or have I set up my multi-tenancy incorrectly?

Also, if I cannot have admin users for my tenant site what is this significants of the admin account that is required when setting up a tenant?

Thank you in advance
Feb 5, 2014 at 10:54 AM
After some exploring, I believe the following things are in play with the above scenario:

1) I am using a tenant login page which looks like the following: http://localhost:30320/OrchardLocal/SubTenantSite/Admin . Obviously, I do not have access to this page so I am now redirected to the 'access denied' page that is specified in the web.config in Orchard. This will attempt to log me into the top level site and not the SubTenantSite. So I cannot log in to this site using the admintenant user because this account is not the super user for the top level site.

To resolve this, I must use the URL that is provided by the 'sign in' link. because this includes the tenant within the url.

2) When moving between sites as the super user, I take on the identity of the super user for that tenant. Even if the passwords are different. This leads me to believe that the super user and password you set for the setup should be the same. What are the views on this?
Feb 11, 2014 at 12:53 PM
Your confusion might be caused by some bugs in Orchard that should be fixed in the latest source.

Tenants have no common content, neither users. So your assumption that the two admin users on the two tenants are different is correct. The reason you could see yourself logged in on a tenant after logging in on another one can be because of the login cookie being shared across the tenants - what is a bug.