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.
Problem/Motivation
Upon saving a user that exists in Discourse, the following error message is displayed in the log:
Discourse not synchronized. Group [name] does not exist.
However the group name does exist, after some debugging I found another error when trying to search for groups.
`403 Forbidden` response: {"errors":["You need to be logged in to do that."],"error_type":"not_logged_in"}
Steps to reproduce
- Create user in Drupal
- Create user in Discourse
- Assign user in Drupal a role (that has already been synced with Discourse)
- See issue in log
Proposed resolution
Looks like the /groups/search.json endpoint maybe use to allow get params, but now this is not an option?
I found that if you apply the api-key and api-username as headers then the syncing works again.
Comment | File | Size | Author |
---|---|---|---|
#4 | discourse_sso-role-sync-3162446-4.patch | 497 bytes | fjgarlin |
Comments
Comment #2
3liComment #3
3liComment #4
fjgarlin CreditAttribution: fjgarlin as a volunteer and commentedRe-rolling patch for 2.0.x version as the previous would not apply.
Also marking as RTBC as the above patch fixed the issue described.
Comment #5
AaronBaumanBump, RTBC+1
Comment #7
jurgenhaasSorry for the delay, mergin right now.
Comment #8
jurgenhaas