This module is great for testing and I have been heavily relying on it to test dozens of use cases for various user levels.

However, when using multiple subdomains via Domain Access along with $cookie_domain to share sessions between these subdomains Masquerade fails to maintain the current (sub)domain.

When I am on subdomain1.mydomain.com and masquerade it returns to the default domain.

In most Domain Access setups this may not be noticeable if the page you are viewing is accessible from both the primary domain and the subdomain(s).

But when you are using Domain Strict it becomes very noticeable as you are nailed with an "Access Denied" page after masquerading.

If support for Domain Access could be added to the Masquerade module that would be truly splendid!

And I guess there is that chance that I have something configured wrong, so if this support is already possible, please change this to a support request and share your recipe!

Cheers

Comments

deekayen’s picture

Category: feature » support
Status: Active » Needs review

You need to share more than just the cookie. You'll need to use table prefixing within the same database to share the masquerade, sessions, and users tables.

lee20’s picture

Status: Needs review » Active

That's too much work!

I don't know the magic behind masquerade but I would have thought that if the sessions are already shared it would just be a matter of just making sure masquerade doesn't change the domain...

I may be way off base but duplicating tables shouldn't be necessary.

I should take the time to look, but instead I'll just point out that it's not obvious why masquerade would be tied to a domain? Why would it care? And if it does factor in the domain name, then it shouldn't behave like this in the first place IME.

lee20’s picture

And if it does factor in the domain name, then it shouldn't behave like this in the first place IME.

I guess I should elaborate on this a bit more.. I mean that if masquerade has any domain logic then it doesn't make sense to me why it would forget the current domain that you are on, and after masquerading take you to a different domain (as described in my original post).

apaderno’s picture

Title: Add support for Domain Access » Support for Domain Access?
Issue summary: View changes
Status: Active » Closed (outdated)

I am closing this issue, as Drupal 6 is no longer supported.