mumukit-login 6.1.0 → 6.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mumukit/login/provider.rb +7 -7
- data/lib/mumukit/login/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b4c0227c6312c203934f5b698f382707358a369eda06d8bd9e1a0a8acafbce8d
|
4
|
+
data.tar.gz: ed2e7d7c57184044d2ffe16f771a493766e66185beaafb85dce18e7461ea1ebf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 302ffd66ec3ba05ef8d0586cc8be0fe58369c03d5886f4daf24bbeed01bc2fcc9af8519c38cd8c39c33b83fb40d5294eaa2fccfdbdd6ae5ad8ca387c13a40b93
|
7
|
+
data.tar.gz: 92c97e2fef48b9a9af586241c5ac22a210fc0195d2640328a07d20684208c2e550275807a8e552505a8c6cac2fdc86c66f785c7232f6b58e4624c41d9bbc6b47
|
@@ -11,8 +11,8 @@ module Mumukit::Login::Provider
|
|
11
11
|
parse_login_provider(login_provider_string)
|
12
12
|
end
|
13
13
|
|
14
|
-
def self.default_enabled_providers
|
15
|
-
case ENV['RACK_ENV'] || ENV['RAILS_ENV']
|
14
|
+
def self.default_enabled_providers # This is a list of the default enabled login providers
|
15
|
+
case ENV['RACK_ENV'] || ENV['RAILS_ENV'] # It depends only on the current environment
|
16
16
|
when 'production'
|
17
17
|
PROVIDERS - %w(developer)
|
18
18
|
when 'test'
|
@@ -22,17 +22,17 @@ module Mumukit::Login::Provider
|
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
25
|
-
def self.enabled_providers
|
26
|
-
if ENV['MUMUKI_ENABLED_LOGIN_PROVIDERS'].blank?
|
25
|
+
def self.enabled_providers # This is a list of the login providers enabled on the current instance of the platform
|
26
|
+
if ENV['MUMUKI_ENABLED_LOGIN_PROVIDERS'].blank? # It is obtained from the environment, and if unset, it defaults to default_enabled_providers
|
27
27
|
default_enabled_providers
|
28
28
|
else
|
29
29
|
ENV['MUMUKI_ENABLED_LOGIN_PROVIDERS'].split ','
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
33
|
-
def self.login_provider_string
|
34
|
-
if ENV['MUMUKI_LOGIN_PROVIDER'].blank?
|
35
|
-
|
33
|
+
def self.login_provider_string # This is the default login provider used when it is not overriden in the organization's config
|
34
|
+
if ENV['MUMUKI_LOGIN_PROVIDER'].blank? # It is obtained from env, and defaults to the first of the current enabled providers
|
35
|
+
enabled_providers.first # It should always be a provider within the enabled_providers list
|
36
36
|
else
|
37
37
|
ENV['MUMUKI_LOGIN_PROVIDER']
|
38
38
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mumukit-login
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.1.
|
4
|
+
version: 6.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Franco Leonardo Bulgarelli
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-09-
|
11
|
+
date: 2018-09-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|