Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
1. User exists on the master site, but not yet on a slave site.
2. On the slave site, an admin wants to add a user to a group or assign node ownership.
3. Bakery should go ahead and request the account so it can be used.
Comment | File | Size | Author |
---|---|---|---|
#8 | 1034856_bakery_autocomplete_slavesites.patch | 6.72 KB | greggles |
#6 | bakery.diff | 6.93 KB | drumm |
#4 | bakery.diff | 6.11 KB | drumm |
#3 | bakery.diff | 2.08 KB | drumm |
#1 | bakery.diff | 1.5 KB | drumm |
Comments
Comment #1
drummInitial version which looks for user fields with #autocomplete_path === user/autocomplete. Overriding the autocomplete itself would be nice. Needs testing.
Comment #2
coltraneHmmn, I don't really like it attaching to every autocomplete, seems to add unnecessary overhead. One way to lessen it would be to check user_access() for the admin bakery permission.
I was wondering about a form option for requesting, which, turns out, you have at #1033322: Pull account form for admins.
I kind of want to separate the SSO and the synchronizing of data in Bakery, let me think on this some more and try and get some specifics out.
Comment #3
drummThis patch remembers which form_ids are altered. Forms without user autocomplete fields are ignored after the first time.
Comment #4
drummAnd here is a patch that which adds a fortune cookie exchange for autocompletion. Fortune cookies probably originate from San Francisco, where I live, and attempt to give advice, like autocomplete.
Comment #5
coltraneLeftover debug, and another two lines later.
The patch works. I created an account on my master site, then went to the slave site and using the Authored by autocomplete on the node_add form could get that user to appear. After submitting the node that user account existed on the slave site.
I don't think every Bakery site is going to want this functionality, especially available to every user with 'access user profiles' permission. If the whole use case was behind a variable it would at least help these users and not make an ever-growing bakery_user_forms variable with form IDs.
Neil, one of the drupal.org use case is association.drupal.org/intranet, right? Allowing group admins to add people to groups who don't yet have an account on the association intranet?
Comment #6
drummThis patch fixes both issues.
Yes, association.drupal.org/intranet is exactly the use case.
Comment #7
drummComment #8
gregglesRe-rolled.
I'm not sure this is necessary/appropriate:
On a site with a lot of matches it is likely that you'll get 10 but still not the one you want. I guess users can keep typing, but personally I'd rather get the list from both sides sooner.
The idea of remembering which forms need this is interesting. Did you see a performance hit from going deep into a complex form? That seems like it should be quick while the downside (a huge variable of form_ids) could be painful. I also wonder how well this will work given form_ids are sometimes re-used (I think the node/add/blog form and the admin/content/node-type/blog forms use the same form ID and do not match each other in terms of using an autocomplete).
Comment #9
drummThanks to #1211474: Set dev sites up for bakery testing, I should be able to take another look at this, along with anyone else on the dev sites.
Comment #10
coltraneCNW?
Comment #11
gregglesWhich part NW?
My criticisms in #8 could be fixed later if we find they are problems. Let's do eeet.
Comment #12
coltraneI interpreted "I should be able to take another look at this, along with anyone else on the dev sites." as drumm thinking it needed work still. But on reread it does just sound like testing.
Comment #13
drummI'm guessing this patch needs a reroll. It is still important, but can wait until the next release cycle.
Comment #14
gregglesIt applies fine to 6.x-2.x, actually. The re-roll is only necessary for the 7.x-2.x branch.
Comment #15
drummThe use case we're running into now is the Speaker(s) field for session submission. If the co-presenter hasn't used the site yet, they aren't available for autocompletion. In this case, we could hook into the field system instead of scanning through the whole form.
Comment #16
drumm