I'm setting up a new Drupal 6.14 server which will host several domains using domain access. I'm not currently using OG (but probably will in the future) or any other node access modules.

All of the domains will share content. On some domains nodes will need to be available to anonymous users, while on other domains the same content may need to be restricted to authenticated users.

I read on another post http://drupal.org/node/517876 that someone was advised to do something similar using domain strict and assigning anonymous users to the primary domain, but I don't think that would work if more than one domain will be needing anonymous node access.

I don't suppose there's a module that allows assignment of permissions on a per domain basis?

If someone could point me in the right direction I would appreciate it.

Comments

agentrickard’s picture

You can do this with Domain Strict and the provided 'User defaults' settings found at 'admin/build/domain/roles'.

Simply add the domain(s) you wish to the anonymous user role. Use the 'dynamic' setting. This will tell DA that anon users are "members" of the domains you specify.

CardinalFang’s picture

Thanks, I'll give it a try.

agentrickard’s picture

Status: Active » Closed (fixed)

Reopen if that doesn't work.

CardinalFang’s picture

Status: Closed (fixed) » Active

I followed your suggestion. Anonymous users can still access content on domains for which "Anonymous User" is not checked in the user defaults tab. Checking "Authenticated User" for the restricted domain made no difference.

agentrickard’s picture

Did you turn Domain Strict back on?

agentrickard’s picture

Confirmed that this works as designed.

Also note that content assigned to 'all affiliates' is always visible to all users on all domains.

agentrickard’s picture

Status: Active » Closed (fixed)
chenop’s picture

Subscribing for the same problem.

Domain strict is enabled, in user defaults anonymous user role is not checked for the restricted domain, "affiliate to all" is not marked for nodes.

and still, anonymous user can reach all content in the restricted domain.
Please help...

stewest’s picture

Chenop, are you using any other content / node access type modules?

If so, there could be a conflict, and the one permission is overriding the other. Try the Domains Access Advanced ( http://drupal.org/project/domain_adv ) module, where you choose "AND" / "OR" permissions.

Then, just as a side note, sometimes it is wise to "rebuild permissions" (admin/content/node-settings) when you have made such Permission changes or possibly even clear your cache, run cron... to make sure all the new settings have loaded.

See a list of Contrib Modules for DA which might also help. http://drupal.org/node/1068570