Restricting publishing certain content types to a single domain with Domain Access module

liternet - February 9, 2009 - 17:34
Project:Domain Access
Version:6.x-2.0-rc5
Component:Miscellaneous
Category:feature request
Priority:normal
Assigned:Unassigned
Status:postponed
Issue tags:Content type, subdomains
Description

I searched for an answer, but I couldn't find anything. Could anybody please point me in the right direction?

I am doing a clean install of drupal for and Domain Access with several subdomains, such as:

maindomain.com
subdomain1.maindomain.com
subdomain2.maindomain.com
subdomain3.maindomain.com

The different subdomains will have different custom content types. Say, subdomain1 will have ONLY news content type, subdomain2 will have ONLY article content type, and so on. I will have editors who are assigned permissions to post/edit content for one o multiple subdomains. My problem is that I don't want a certain content type to be publishable to other domains except the one it is assigned to.

My question is: is it possible to restrict the posting of a certain content type to a certain domain using Domain Access? That is, for editor X to be able to post a news content type ONLY to subdomain1.maindomain.com from any of the domains?

Thanks.

#1

agentrickard - February 9, 2009 - 19:19

Not without custom code.

#2

liternet - February 9, 2009 - 22:52
Category:support request» feature request

If it's not possible now, I think this would be a good feature to have. Restricting a certain content type to a certain domain.

#3

jkdrupal - February 9, 2009 - 23:25

Similar to liternet's request, I need to control the showing of cck fields based on which domain the node is being shown in.

To explain, assume the following:

- a drupal site uses the Domain Access module and has two domains: d1 and d2
- a content type is created that has 3 cck fields: F1, F2, F3

When a node is shown in domain d1 the node should show cck fields F1 and F3, however when a node is shown in domain d2 the node should show cck fields F2 and F3

Perhaps there is, or will be a way to do this without using Views or programming?

Jerry

#4

agentrickard - February 10, 2009 - 14:37
Version:6.x-1.2» 6.x-2.0-rc5
Status:active» postponed

No, you have to use hook_form_alter() or a similar mechanism in both cases.

#5

FilmKnurd - February 12, 2009 - 13:59

How do you manipulate DA from within hook_form_alter()? I tried dumping the $form array and I could not find anything in there relating to DA. So, I'm at a loss as to how to access and alter DA functionality.

#6

moskit - February 20, 2009 - 20:08

Maybe you should create table prefix for users.

#7

mrgoltra - May 13, 2009 - 19:05

subscribing. I too am looking to restrict content per domain.

#8

amassel00v - June 4, 2009 - 17:38

We are very insteresting by this feature.

In our case, all sites share the sames contents types (for example, ContentType1, ContentType2, ContentType3, ContentType4), but we want restrict access ContentType4 to all user with "Edit domain node" permission.

#9

trailerparkopera - September 15, 2009 - 16:17

Has anyone developed a workaround for this?

#10

lilott8 - September 15, 2009 - 21:38

You can do this by developing roles for different users. So that there is a "SiteA roles" and they are the only ones that can create/edit/delete news contents. You then set "SiteA" users to have a default domain of "SiteA".

This is doable, you just have to have a very strategic approach in the setup of:
-Views
-Domain Access
-Taxonomy Access Control
-User Roles

We are doing something very similar to what you are referring to. There are some overlap in what content can go where, but it is very doable.

In views you need to make heavy use of the domains filtering option
in the DA you need to have it configured to use your DA editors, etc
We use TAC so that certain groups only see certain parts of our tax tree
User Roles are the most meticulous setup of them all. It took a bit of testing to get them straightened out.
I also developed a module that automated the assignment of default domain publishing. So that it reads user's credentials and then assigns them to particular domains that I allow them to.

#11

agentrickard - September 15, 2009 - 23:54

I would swear that someone released a module for this, or at least posted one in the queue. Search around and see if you can find it.

#12

lilott8 - September 17, 2009 - 20:00

you could use:
http://drupalmodules.com/module/content-access
This module lets you set rules for who can post what content. Then let DA handle where they are allowed to post that content. Though if userA is part of siteA and siteB then your still back to square 1.

#13

ctalley5 - November 9, 2009 - 04:02

Same situation for us. User A is part of both sites... and trying to restrict content types per site.

 
 

Drupal is a registered trademark of Dries Buytaert.