Closed (outdated)
Project:
Bakery Single Sign-On System
Version:
7.x-3.x-dev
Component:
Code
Priority:
Minor
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
12 Aug 2009 at 19:57 UTC
Updated:
15 May 2025 at 01:43 UTC
Jump to comment: Most recent
Comments
Comment #1
gerhard killesreiter commentedActually, the idea was to be able to have distinct sets of roles for different sites.
In principle it should be easy to add the role IDs/ Names to the cookie, though.
Comment #2
Magnity commentedPerhaps a variant of this would be to allow the master site to control the roles for which bakery login is allowed. For example, this would allow an admins subsite made up only of whose with the role 'admin' on the master site.
I for one would find this very useful, and I suspect it could be used on d.o. for those subsites where the access is controlled to members of specific teams.
Comment #3
toemaz commentedsubscribe
Comment #4
avpadernoI agree that would make sense to implement this. The only problem I can see with this is when the roles in the sub-domain is not the same of the master domain. I think this is the case of groups.drupal.org where (if I understood what greggles wrote) there isn't the role but the role .
Considering that, and the fact there would be reasons to not allow the same roles in a sub-domain, it makes more sense to have a setting page for the sub-domain, where the administrator of the sub-domain can decide how to map the Drupal.org role into the sub-domain role (and choose to not apply any mapping, in the case he prefers so).
Comment #5
coltraneI'd like to propose #556666: Sync hooks: Enable sharing of arbitrary data for this. Perhaps Bakery could invoke the sync hook on behalf of the user module. Another module could also implement the hook and provide it's own screens for defining the mapping.
Comment #6
coltraneHere's two snippets that would work in a test.module when Bakery has the sync hook patches applied from #556666: Sync hooks: Enable sharing of arbitrary data.
This assumes role IDs are the same, which is obviously not acceptable. But, the test module on the slave side could have a map from master RIDs to slave RIDs.
Comment #7
coltraneHere's an updated test receive implementing rollback! http://drupal.org/node/556666#comment-2932078
Comment #8
gregglesI think this makes a ton of sense. I'm not sure how to do role mapping in a generalized way :/ I guess you create a tiny database table and CRUD for it? or require an array in settings.php?
Implementing hooks on behalf of core modules is commonly done in contrib and this is another case where it makes sense.
Comment #9
robertdouglass commentedAnother piece of evidence that says numeric keys are problematic. If we had machine names for roles this would be easier. And it would make roles easier to export as "exportables".
Comment #10
juliangb commentedIs there a core issue for this that we could participate in?
Comment #11
crifi commentedI would also like this feature -> subscribe
Comment #12
jmaguniaA slightly different array structure than #7 and #6 worked for me.
Instead of:
$fields['roles']I used:
$fields['data']['roles']and got better results.Comment #13
big_smile commentedWhich version of bakery do I have to use the test module with?
Comment #14
fuzzy76 commentedI'm guessing the version you moved this issue from, 1.x. That said, I think this makes more sense to solve as part of #1232914: Bakery 3.x and pluggable account management.
Comment #15
purencool commented