We need each subdomain site to have their own user roles and permissions. Prefixing the permissions, role and user_roles tables seems to break the redirect functionality which was working before.

So when user 1, who's home site is site A goes to site B, they do not have an assigned role with site B since the tables are prefixed. They should take on the authenticated role and I have set the domain settings for this role as follows:

- 'view domain publishing'
- Take user to their assigned domain

It seems domain_goto() within the domain_form_alter() function is not being called?

Comments

agentrickard’s picture

The user does not have 'set domain access' permissions on site B, so they? If so, the redirect is never invoked.

This could be many things, including a cache of the $user permissions. Do you have any way to test what roles the user is being assigned?

v1nce’s picture

The user does not have 'set domain access' permissions on site B, do they?
No. Nobody is assigned this permission except uid->1

Do you have any way to test what roles the user is being assigned?
Yes. When the user is within their home (domain assigned) site, they are assigned a role unique to this site. If they navigate to another domain site that they have not been assigned, they take on the 'authenticated user' role and their home role does not follow them as these tables (user_roles, role and permissions) have been prefixed for each individual site.

I am viewing the roles assigned to the $user->roles object.

agentrickard’s picture

I think perhaps the 'user_access' result is being cached.

Do you have any way to test this assumption?

See http://api.drupal.org/api/function/user_access/5

v1nce’s picture

Status: Active » Closed (fixed)

I see user permissions are being cached.

We have since decided not to split out the permissions, role and and user_roles tables across the network. I will close out this support request.

Thanks.

agentrickard’s picture

If it matters, if these are getting stored in the {cache} table, and not a static variable, you could get around this by prefixing your cache tables.