mumukit-login 6.1.3 → 6.1.4
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 37959b71c7f72904623b2db83e2f2562552687236ad5bab307e6ae3c199e5d92
|
4
|
+
data.tar.gz: 18ea3556374cf43691c12fcb078d40e94dd3d52118ad3429ac41576efa3d7354
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f37dc8fa5ff59eaa930ebfcbb4b47f8221bb04b61b90b55bf3a0c9b813540b13ccb152235ebe70f892a2d52a4c7442a490b2e3c2c3d3778f2687592ae4508e4
|
7
|
+
data.tar.gz: 1790e80e4e86c17ead8decc5f0792222b7353bfe9f0feb8177ee669f7b59cb8a100411916debf68934e67fd86b28958723a8585f5cab0311ab0e9556a1396328
|
@@ -48,17 +48,12 @@ class Mumukit::Login::Provider::Base
|
|
48
48
|
def setup_proc
|
49
49
|
proc do |env|
|
50
50
|
options = env['omniauth.strategy'].options
|
51
|
-
|
52
|
-
effective_settings = default_settings.to_h.merge(current_organization_settings)
|
51
|
+
effective_settings = default_settings.to_h.merge(setup_phase_login_settings(env))
|
53
52
|
options.merge!(effective_settings)
|
54
53
|
options.merge!(computed_settings(effective_settings.to_struct))
|
55
54
|
end
|
56
55
|
end
|
57
56
|
|
58
|
-
def current_organization_settings
|
59
|
-
Mumukit::Platform::Organization.current.login_provider_settings || {}
|
60
|
-
end
|
61
|
-
|
62
57
|
# Default provider settings that come from the environment
|
63
58
|
#
|
64
59
|
# Override this method in order to read ENV and in order to provide default settings
|
@@ -82,6 +77,18 @@ class Mumukit::Login::Provider::Base
|
|
82
77
|
|
83
78
|
private
|
84
79
|
|
80
|
+
def setup_phase_login_settings(env)
|
81
|
+
organization_login_settings_for setup_phase_login_organization_name(env)
|
82
|
+
end
|
83
|
+
|
84
|
+
def setup_phase_login_organization_name(env)
|
85
|
+
Rack::Request.new(env).cookies['login_organization']
|
86
|
+
end
|
87
|
+
|
88
|
+
def organization_login_settings_for(name)
|
89
|
+
Mumukit::Platform::Organization.find_by_name!(name).login_provider_settings || {}
|
90
|
+
end
|
91
|
+
|
85
92
|
def create_uri(path, query_values)
|
86
93
|
uri = Addressable::URI.heuristic_parse path
|
87
94
|
uri.query_values = query_values if query_values.present?
|