mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-11-28 09:24:24 +01:00
(bug) case-sensitive emails
- for sso code sending - for adminsys configuration
This commit is contained in:
parent
41f206cc43
commit
193ee4ffe9
@ -1,5 +1,8 @@
|
||||
# Changelog Fab-manager
|
||||
|
||||
- Fix a bug: when requesting to send the sso migration code, the email was case-sensitive.
|
||||
- Fix a bug: the adminsys email was case-sensitive.
|
||||
|
||||
# v5.3.1 2022 January 17
|
||||
|
||||
- Definition of extended prices for spaces is now made in hours (previously in minutes)
|
||||
|
@ -52,10 +52,9 @@ class API::AuthProvidersController < API::ApiController
|
||||
@previous = AuthProvider.previous
|
||||
end
|
||||
|
||||
|
||||
def send_code
|
||||
authorize AuthProvider
|
||||
user = User.find_by(email: params[:email])
|
||||
user = User.find_by('lower(email) = ?', params[:email]&.downcase)
|
||||
|
||||
if user&.auth_token
|
||||
if AuthProvider.active.providable_type != DatabaseProvider.name
|
||||
|
@ -121,7 +121,7 @@ class User < ApplicationRecord
|
||||
def self.adminsys
|
||||
return unless Rails.application.secrets.adminsys_email.present?
|
||||
|
||||
User.find_by(email: Rails.application.secrets.adminsys_email)
|
||||
User.find_by('lower(email) = ?', Rails.application.secrets.adminsys_email&.downcase)
|
||||
end
|
||||
|
||||
def training_machine?(machine)
|
||||
|
Loading…
Reference in New Issue
Block a user