1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-18 07:52:23 +01:00

(bug) Gender, Address and Birthday are not mapped properly from SSO (#365)

This commit is contained in:
Sylvain 2022-07-06 15:56:57 +02:00
parent 4fe7226959
commit bec2e8a514
2 changed files with 15 additions and 14 deletions

View File

@ -2,6 +2,7 @@
## next deploy
- Fix a bug: Gender, Address and Birthday are not mapped properly from SSO (#365)
- Fix a bug: unable to import a new account from an SSO provider
- Fix a security issue: updated rails-html-sanitizer to 1.4.3 to fix [CVE-2022-32209](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-32209)

View File

@ -48,24 +48,24 @@ module SingleSignOnConcern
profile.user_avatar ||= UserAvatar.new
profile.user_avatar.remote_attachment_url = data
when 'profile.address'
invoicing_profile ||= InvoicingProfile.new
invoicing_profile.address ||= Address.new
invoicing_profile.address.address = data
self.invoicing_profile ||= InvoicingProfile.new
self.invoicing_profile.address ||= Address.new
self.invoicing_profile.address.address = data
when 'profile.organization_name'
invoicing_profile ||= InvoicingProfile.new
invoicing_profile.organization ||= Organization.new
invoicing_profile.organization.name = data
self.invoicing_profile ||= InvoicingProfile.new
self.invoicing_profile.organization ||= Organization.new
self.invoicing_profile.organization.name = data
when 'profile.organization_address'
invoicing_profile ||= InvoicingProfile.new
invoicing_profile.organization ||= Organization.new
invoicing_profile.organization.address ||= Address.new
invoicing_profile.organization.address.address = data
self.invoicing_profile ||= InvoicingProfile.new
self.invoicing_profile.organization ||= Organization.new
self.invoicing_profile.organization.address ||= Address.new
self.invoicing_profile.organization.address.address = data
when 'profile.gender'
statistic_profile ||= StatisticProfile.new
statistic_profile.gender = data
self.statistic_profile ||= StatisticProfile.new
self.statistic_profile.gender = data
when 'profile.birthday'
statistic_profile ||= StatisticProfile.new
statistic_profile.birthday = data
self.statistic_profile ||= StatisticProfile.new
self.statistic_profile.birthday = data
else
profile[sso_mapping[8..-1].to_sym] = data unless data.nil?
end