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.
Unless you want to give and manage different permission sets across all the site (which is a good solution to some site designs), you should also share the permissions table.
_____
From: support-bounces@drupal.org [mailto:support-bounces@drupal.org] On Behalf Of Anisa Sent: Tuesday, September 26, 2006 9:16 AM To: support@drupal.org Subject: [support] shared tables for multisite
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.
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@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.
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@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@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/ ]
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@drupal.org [mailto:support-bounces@drupal.org] On Behalf Of Anisa Sent: Thursday, September 28, 2006 11:45 PM To: support@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@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@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/ ]
Hm. So, the signon module configuration is good..? I'll try that then.
I don't really imagine people being an editor on two or more of my multi sites, they're just for my various hobbies and interests, I'll probably get all excited making them and then let them lie for a long time. ;p
Thank you all for your help and thorough explanations!
Anisa.
On 9/29/06, Greg SBC gregbjh@sbcglobal.net wrote:
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@drupal.org [mailto:support-bounces@drupal.org] *On Behalf Of *Anisa *Sent:* Thursday, September 28, 2006 11:45 PM *To:* support@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@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@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/ ]
--
www.AnimeCards.Org
16,000 scans and counting!
-- [ Drupal support list | http://lists.drupal.org/ ]