liqd / adhocracy

Adhocracy is a policy drafting and decision making software for distributed groups and open institutions.
GNU Affero General Public License v3.0
150 stars 37 forks source link

Separate domains per instance #886

Closed nidico closed 10 years ago

nidico commented 10 years ago

This allows to configure separate domains per instance in the Adhocracy configuration.

Static assets (CSS, JS) are still loaded from the main domain.

Be aware that you need to configure DNS, webserver, SSL outside of Adhocracy for each domain.

xi commented 10 years ago

I found a bug in this:

  1. Enable instance domains for one instance and relative URLs as the general rule
  2. Go to the custom instance domain
  3. Try to navigate to a different instance

result: 404 Error

I guess this is because the base_urls of the other instances are absolute paths, no full URLs.

nidico commented 10 years ago

True. Fixed in ace83f683a820dc2c2e57c7b5143a379f7b71931.

xi commented 10 years ago

There is another problem: The session cookie is only set for the current domain. When switching to another domain, the users have to login again (which is strange because they stay on the same platform).

An option could be to create cookies for all domains using some JavaScript hack.

nidico commented 10 years ago

This is a valid issue - I added a note in 51752cc. However 2 out of 3 reasons to implement this feature still stand:

The third reason "Single-Sign-On" isn't done yet.

Due to the partial implementation of the feature, this might only be useful in settings where losing user sessions on instance switch is acceptable.