In our use case, we're having trouble with how nodes are being added.

By design, the module assigns all new nodes to the domain from which they were entered. If the user has 'set domain access' privileges, then this behavior is replaced by a form.

Some of our editors create content from the 'wrong' domain -- we probably need to enforce that they can only create content for 'their' domain.

Question: What is the best solution here? Some options:

1) Create a new permission: 'assign domain content' (or similar) which would:

-- Check which domains the user is assigned to.
-- If count == 1, assign all new nodes to that domain.
-- If count > 1, give a series of checkboxes (radios?) for the user to select.
-- If count == 0, assign to the active domain (the current behavior).

2) As above, but with configuration options for handling case where count > 1.

3) Do not add a permission. Act based on configuration options for users who have the 'edit domain nodes' option.

4) Force all users to enter content from their 'registered' domain by using domain_goto().

Option #4 would mean that, on registration, users might need to select their domain -- currently they are assigned to the active domain that they register from.

Thoughts?

Comments

Anonymous’s picture

Is option #1 currently being implemented with the "edit domain nodes" options? It took me a bit to sort out how to get this working, but I think I may have it now.

Here's basically what I have. All of my users sign up on a central site, the base domain ala example.com. I want Joe to be able to post his blog at news.example.com and I want Fred to be able to blog to both fun.example.com and stuff.example.com.

So in the Domain Access settings, I've got "use access control for editors" turned on, then for each user I've edited to set the appropriate subdomains under Domain Access Settings. Then I've got their role set with access to "edit domain nodes". I've also, via HEAD got the SEO setting "Rewrite all URLs to point to a single source" and the new content setting "Only show on selected sites".

Then basically, the users post to their blogs from the domain where the post should end up. It seems to work, except as it posts it pushes them back to example.com and gives an access denied error, even tho it posts okay.

Just checking if I've got it more/less right.

agentrickard’s picture

Version: 5.x-1.0beta5 » 5.x-1.0beta7

User Joe posts his blog at news.example.com, I've tried setting his Domain access setttings to only news.example.com, but whenever he writes a blog post, even from that subdomain, it goes to example.com instead

For this, it may be that all nodes are being assigned to 'all affliates' -- make sure that your new content settings are correct. You can also restrict this setting per node type.

Anonymous’s picture

Once I figured it out, I was a bit embarrassed and edited my post, but still not absolutely sure I'm doing it the right way. See above. =)

Thanks again agentrickard

agentrickard’s picture

OK, I'm going to break down the latest version of the post.

Is option #1 currently being implemented with the "edit domain nodes" options? It took me a bit to sort out how to get this working, but I think I may have it now.

Not quite. "Edit domain nodes" allows a privileged user to edit all nodes assigned to a specific domain. You normally do not want normal users to have this permission. "Set domain access" allows a user role to view the domain assignment form. YOu normally don't want to give that permission to users, either.

Option #1 is a proposed feature that helps eliminate some of the confusion that people in the "real world" are having. By design, the node will be assigned to the active domain from which the node was created. This has created workflow issues for people (yourself included).

Here's basically what I have. All of my users sign up on a central site, the base domain ala example.com. I want Joe to be able to post his blog at news.example.com and I want Fred to be able to blog to both fun.example.com and stuff.example.com.

Right now, any user can post to any domain -- it depends on where they enter the content from. What you want is a new feature (described in option #1) that gives normal users some control. For users only assigned to a single domain, option #4 above would solve this problem.

Are Fred and Joe just regular "authenticated users"?

So in the Domain Access settings, I've got "use access control for editors" turned on, then for each user I've edited to set the appropriate subdomains under Domain Access Settings. Then I've got their role set with access to "edit domain nodes". I've also, via HEAD got the SEO setting "Rewrite all URLs to point to a single source" and the new content setting "Only show on selected sites".

What you describe in terms of editing is not the original use case of the module, and you might be giving some users too much permission. Read again what 'edit domain nodes' actually does -- it is designed for administrative editors.

The other settings should be fine. Note that you can have node-type specific settings as well.

Then basically, the users post to their blogs from the domain where the post should end up. It seems to work, except as it posts it pushes them back to example.com and gives an access denied error, even tho it posts okay.

This I will have to investigate.

Just checking if I've got it more/less right.

Sort of. I think you are running up against a use-case that isn't quite what the module was designed for.

Anonymous’s picture

Ahh thanks for clarifying all of that.

Are Fred and Joe just regular "authenticated users"?

They're under a role I've made for "blog editors". They're somewhat trusted, but not completely, I'd rather not have them accidently muck something up. I'd be happy with a per-role control over which subdomains they post to, although per-user makes more sense to me.

agentrickard’s picture

You probably want 'per user' control. The 'edit domain nodes' permission would let Fred edit Joe's posts under the following conditions:

- Fred has the 'edit domain nodes' permission
- Fred is assigned as an editor for one.example.com
- Joe makes blog post A to example.com
- Joe makes blog post B to one.example.com

In this case, Fred can edit post B, which is probably not what you want.

jdcllns’s picture

Title: Restrict node creation to assigned domains » Restrict user posting to assigned domains
Category: feature » support

It seems that no matter which user posts a story, they're published to "All affiliates". I can't figure out how to configure drupal and the Domain Access module to control where stories end up. I want to limit each author to a subdomain.

Although I've tried this several different ways, here's my current set up:

www.mydomain.com
sub1.mydomain.com
sub2.mydomain.com

"Use access control for editors" and "Only show on selected sites" are selected.

The role "author" has "edit domain nodes" unchecked.

Under "users", "author1" has "sub1" selected. "author2" has "sub2" selected. Both assigned to the role "author".

What am I missing?

agentrickard’s picture

Title: Restrict user posting to assigned domains » Restrict node creation to assigned domains
Category: support » feature

Your issue is misfiled. Please don't hijack feature request threads.

The answer to your question is likely in http://drupal.org/node/197642.

Please repost there.

jdcllns’s picture

Title: Restrict node creation to assigned domains » Oops! Sorry

I wasn't thinking. When I got to the last post I just automatically hit the Reply button.

jdcllns’s picture

Dammit! Now I changed the name. Sorry. Looks like it's one of those days. :-(

agentrickard’s picture

Title: Oops! Sorry » Restrict node creation to assigned domains

I have had days like that, too.

agentrickard’s picture

Status: Active » Closed (fixed)

Fixed in HEAD. This is now configurable for users with the new 'view domain publishing' permission.