mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-29 18:52:22 +01:00
[bug taiga#21] undefined method[] on notify_admin_profile_complete
This commit is contained in:
parent
d1a9a69d14
commit
ef72d07a9e
@ -5,6 +5,10 @@ class AuthProvider < ActiveRecord::Base
|
|||||||
def providable_type
|
def providable_type
|
||||||
DatabaseProvider.name
|
DatabaseProvider.name
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def name
|
||||||
|
'DatabaseProvider::SimpleAuthProvider'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
PROVIDABLE_TYPES = %w(DatabaseProvider OAuth2Provider)
|
PROVIDABLE_TYPES = %w(DatabaseProvider OAuth2Provider)
|
||||||
@ -39,6 +43,9 @@ class AuthProvider < ActiveRecord::Base
|
|||||||
|
|
||||||
## Get the provider matching the omniAuth strategy name
|
## Get the provider matching the omniAuth strategy name
|
||||||
def self.from_strategy_name(strategy_name)
|
def self.from_strategy_name(strategy_name)
|
||||||
|
if strategy_name.blank? or all.empty?
|
||||||
|
return SimpleAuthProvider.new
|
||||||
|
end
|
||||||
parsed = /^([^-]+)-(.+)$/.match(strategy_name)
|
parsed = /^([^-]+)-(.+)$/.match(strategy_name)
|
||||||
ret = nil
|
ret = nil
|
||||||
all.each do |strategy|
|
all.each do |strategy|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user