FIX: Revert formatting of sync_sso groups to match API #257
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
After upgrading from 0.47.0. to 0.48.1, I noticed our sync_sso calls started failing with 500s from Discourse. Reviewing the Discourse logs showed that it expects
groups
to be a comma separated string, not an array. This line here.This is also mentioned in the setup doc:
I am running an older version of discourse (2.8.13) but I do not believe that this API endpoint has changed in new versions.
The PR that introduced this change was trying to modify
DiscourseApi::SingleSignOn#groups
, but changed both the#parse
and#parse_hash
methods. I believe#parse_hash
is used exclusively for calling the sync_sso from discourse. Looks like an accidental change.I am also modifying the spec to check the
groups
option as well. So this behavior is not accidentally changed again.If I'm wrong and there was an API change, feel free to ignore this PR.
Thanks