[support] shared tables for multisite

Greg SBC gregbjh at sbcglobal.net
Fri Sep 29 14:12:03 UTC 2006


Sharing roles but not permissions can be a powerful way to differentiate
sites or site sections and the permissions roles can have in each. I use
such a setup up so that editors of section of a multisite only have
editing/config permissions in there area. But it can get really messy too if
you are not neat during setup and you keep good notes of what you did. It
can be a pain though to update 3 to 5 sets of access permission when you add
a new module or update who can do what.
 
Not sharing the roles tables (while sharing the users table) add another
layer of messiness that had really be ready to manage. Each user could have
differenent roles under each section of the multisite. So you if want 'Jon
Doe' to be an 'editor' in site one and two, you need to go to his profile in
both sites and add him to that role.
 
I don't think that layer of abstraction is needed if you just use the
permissions table, to give the 'editor' role access under site one and two,
but then no extra access in other places. So my recommendation would be to
share the roles table, but not permissions.

  _____  

From: support-bounces at drupal.org [mailto:support-bounces at drupal.org] On
Behalf Of Anisa
Sent: Thursday, September 28, 2006 11:45 PM
To: support at drupal.org
Subject: Re: [support] shared tables for multisite


Hm.  losing nids, does it matter? (happy to ignore problems that are not
problems! :)  Also, what happens if you share roles, but not permissions?
What if I didn't want to share roles?

Does anyone have a multi install and can share their working config, as well
as why they did it that way?

Anisa.


On 9/27/06, Jeremy Epstein <jazepstein at gmail.com> wrote: 

Be very careful about sharing the 'sequences' table. If you share this
table, then you are sharing the generation of IDs of ALL types (for
many, but not all, drupal entities) across all your sites. That is, if
you share the sequences table but not your node tables, then you will 
be 'losing' a lot of nids (I guess this could be regarded as a good
thing or a bad thing - either way, it's probably not a major thing).

The trouble is, if you DON'T share the 'sequences' table, then you
will only be able to create users on one site, and not on any of the
others. That is, you will have to disable user registration on all
sites but one. If you don't, then you will get SQL 'duplicate entry'
errors, and you will have UID conflicts, and there will be user 
accounts that never actually get created.

IMO, the solution to all of this is to ditch the 'sequences' table
altogether, and to just rely on database generation of IDs (i.e.
auto_increment or equivalent). 

Cheers,
Jeremy.

On 9/27/06, Anisa <mystavash at animecards.org> wrote:
> OK.  Let's say you only want to share users across a multisite
installation. 
>  In a plain Drupal installation, are these the only tables you need to
> share? (copied from the single signon module)
>
>  * 'default' => 'somesitename_',
>  * 'authmap' => 'shared_', 
>  * 'profile_fields' => 'shared_',
>  * 'profile_values' => 'shared_',
>  * 'role' => 'shared_',
>  * 'sequences' => 'shared_',
>  * 'sessions' => 'shared_',
>  * 'users' => 'shared_', 
>  * 'users_roles' => 'shared_',
>  * 'users_uid_seq' => 'shared_', // for pgsql
> Anisa.
>
>
--
[ Drupal support list | http://lists.drupal.org/  <http://lists.drupal.org/>
]





-- 
*********************************
www.AnimeCards.Org

16,000 scans and counting!
********************************* 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20060929/68b76b25/attachment.htm


More information about the support mailing list