I just have 4 sites set up on my server with one drupal code base. They share the same user data by defining
$db_prefix = array(
.....
'users' => 'shared_',
'sessions' => 'shared_',
'role' => 'shared_',
'authmap' => 'shared_',
'sequences' => 'shared_',
);
in the corresponding sites' settings.php. The contents of the four sites are independent. In fact two of them are intended for personal blogs for the site managers, and the other two for two branch sites with different foci.Together the four sites constructs a community.

So, I need to control the privileges of my users to a site-specific level. Especially, I need to have one managers for each site, who can control the user privileges for that specific site but those privileges should not be applicable in the whole community. (For example, the blog owners may not like members of the two main sites to post on his blog, while the main sites welcome the contribution of their members).

I don't know whether it is enough to achieve this goal based on the above configuration. Or do I need some extra modules to accomplish this?

Grateful to any suggestions!

---
Han

Comments

Anonymous’s picture

Ther user_roles table is not shared, so roles can be assigned to users on a per site basis.
I am not sure but maybe the roleassign module could help here.

-----------------------------------------
Joep
CompuBase, websites and webdesign

shyamala’s picture

The role table defines the different roles defined in the site.
The permissions table defines the permissions for each role.
The users_roles table defines the relationship between the users and their roles.

In your case you have a common user table and role table. By having independent users_roles table for each of your sites you can achieve your requirements.

Shyamala
Team Leader Netlink Technologies Ltd.

kambrian’s picture

Thank you both!
I've looked through the database and tested the tables with my sites. The case is right as you explained. Now I'm relaxed.
However, I am now commenting out the role=>'shared_' lines so that each site manager creates his own roles. Hope that won't make any trouble. Actually, I can't see any necessity in making roles shared without sharing permissions at the same time since I'll have to assign permissions for each role on each site.

__

Han

Anonymous’s picture

If you want to have the same set of roles for all sites, then you should share them. If you want each site to have it's own roles, you should seperate them.

-----------------------------------------
Joep
CompuBase, websites and webdesign

plasticlax’s picture

i followed the instructions for creating a multisite with the following shared tables:

$db_prefix = array(
'default' => 'siteN_',
'users' => 'shared_',
'sessions' => 'shared_',
'role' => 'shared_',
'authmap' => 'shared_',
'sequences' => 'shared_',
'profile_fields' => 'shared_',
'profile_values' => 'shared_',
'users_roles' => 'shared_',
);

i have seen half a dozen different lists of what to share and what to not share. it would be nice to know exactly what the effects of all combinations are... it would also be nice to know the effects of changing this once users and roles and perms are already set up. for instance, given the above config, say i wanted to switch to a nothing-shared environment, what would happen to node authorship references and other log entry references and so on?

at first shared users/roles look like a maintenance time saver, but really, the only shared user i would really want is the user #1 superuser.