[Ficus] sync custom forms fields on SSO registration - #142
Merged
melvinsoft merged 1 commit intoJul 28, 2017
Merged
Conversation
bryanlandia
reviewed
Aug 1, 2017
bryanlandia
left a comment
There was a problem hiding this comment.
Hey Maxi, I know you already merged this, but this might be a good one to push upstream if some tests are added and you move the changes from envs/*_appsembler.py to envs/*.py
Author
|
@bryanlandia Good idea, I'm going to create a card on the inbox to address this. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This solution was designed for Trinity initially, but I could be useful for any customer using registration fields.
The problem:
When we are using SSO, in most of the cases, customers wants to use auto-registration, this means when a user clicks on sign in or register, is redirected to the Identity Provider (OAuth or SAML), after the user successfully logs in, is redirected back to edX with the auth request, and the user attributes. By default edX automatically populate only default registration fields. So when we are using Extra registration fields, there is no way to sync those attributes. Besides the problem of not have this fields in our database, if some of the extra fields are required, the auto-registration workflow will break.
The solution:
This PR adds a new settings:
CUSTOM_SSO_FIELDS_SYNCby default in False, but is expected to be a dictionary, when we can list all the extra registration form fields that we want to map. The code changes are pretty small, basically they check if this dict isn't false, and maps the attributes using the same default logic.