1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-19 08:52:25 +01:00

(bug) when email was mapped from SSO but provided as empty string -> unable to merge account

This commit is contained in:
Sylvain 2022-06-27 10:38:15 +02:00
parent 3c0a394850
commit 46b2ba1f54
2 changed files with 2 additions and 1 deletions

View File

@ -14,6 +14,7 @@
- Added some eslint rules to validate react components code style
- Fixed all react components code according to eslint rules
- Renamed proof-of-identity to supporting-documents in react components and in end-user strings
- Fix a bug: when email was mapped from SSO provided as empty string -> unable to merge account
- Fix a bug: the birthdate was not marked as required, in the profile edition form
- Fix a bug: when the phone or the address were required, they were not marked as this, in the profile edition form
- Fix a bug: the birthday was not shown in user edition form

View File

@ -41,7 +41,7 @@ module SingleSignOnConcern
## @param data {*} the data to put in the given key. Eg. 'user@example.com'
def set_data_from_sso_mapping(sso_mapping, data)
if sso_mapping.to_s.start_with? 'user.'
self[sso_mapping[5..-1].to_sym] = data unless data.nil?
self[sso_mapping[5..-1].to_sym] = data unless data.nil? || data.blank?
elsif sso_mapping.to_s.start_with? 'profile.'
case sso_mapping.to_s
when 'profile.avatar'