mumukit-login 4.4.0 → 5.0.0
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/helpers/authentication_helpers.rb +2 -2
- data/lib/mumukit/login/helpers/login_controller_helpers.rb +1 -1
- data/lib/mumukit/login/helpers.rb +0 -1
- data/lib/mumukit/login/settings.rb +14 -0
- data/lib/mumukit/login/version.rb +1 -1
- metadata +7 -14
- data/lib/mumukit/login/helpers/user_permissions_helpers.rb +0 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d27bffe5261f65a85d9f6491afff8dde964f88ef128fa2c16679d7b53304689
|
4
|
+
data.tar.gz: a91ab61c156b87d045cad2cf6bc2d2303381e13acb020f19a9321b938436ee09
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c5805828098db5b30cf98be8c72036e0a3d357161035976ce2e05a157ff05fc1d03c90416b6d7b4ec2dcee95aa9ed9161280fa14264509cd784bacc6c940b2e4
|
7
|
+
data.tar.gz: e0f65ecdee8524ee615f5b705df973f1328156ef13dc80b163ee423839ee004abef8556295955633ecde2bf2af1304cf5349351eac8de00e2b012a5e4286baf1
|
@@ -9,7 +9,7 @@ module Mumukit::Login::AuthenticationHelpers
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def current_user
|
12
|
-
@current_user ||= Mumukit::
|
12
|
+
@current_user ||= Mumukit::Platform::User.find_by_uid!(current_user_uid) if current_user?
|
13
13
|
end
|
14
14
|
|
15
15
|
private
|
@@ -39,4 +39,4 @@ module Mumukit::Login::AuthenticationHelpers
|
|
39
39
|
def login_provider
|
40
40
|
Mumukit::Login.config.provider
|
41
41
|
end
|
42
|
-
end
|
42
|
+
end
|
@@ -11,7 +11,7 @@ module Mumukit::Login::LoginControllerHelpers
|
|
11
11
|
|
12
12
|
def callback_current_user!
|
13
13
|
profile = Mumukit::Login::Profile.from_omniauth(mumukit_controller.env['omniauth.auth'])
|
14
|
-
user = Mumukit::
|
14
|
+
user = Mumukit::Platform.user_class.for_profile profile
|
15
15
|
save_current_user_session! user
|
16
16
|
origin_redirector.redirect_after_login!
|
17
17
|
end
|
@@ -68,3 +68,17 @@ class Mumukit::Login::Settings
|
|
68
68
|
[:user_pass]
|
69
69
|
end
|
70
70
|
end
|
71
|
+
|
72
|
+
class Mumukit::Platform::Organization::Settings < Mumukit::Platform::Model
|
73
|
+
def login_settings
|
74
|
+
@login_settings ||= Mumukit::Login::Settings.new(login_methods)
|
75
|
+
end
|
76
|
+
|
77
|
+
def customized_login_methods?
|
78
|
+
login_methods.size < Mumukit::Login::Settings.login_methods.size
|
79
|
+
end
|
80
|
+
|
81
|
+
def inconsistent_public_login?
|
82
|
+
customized_login_methods? && public?
|
83
|
+
end
|
84
|
+
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:
|
4
|
+
version: 5.0.0
|
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-02-
|
11
|
+
date: 2018-02-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -182,22 +182,16 @@ dependencies:
|
|
182
182
|
name: mumukit-platform
|
183
183
|
requirement: !ruby/object:Gem::Requirement
|
184
184
|
requirements:
|
185
|
-
- - "
|
186
|
-
- !ruby/object:Gem::Version
|
187
|
-
version: '0'
|
188
|
-
- - "<"
|
185
|
+
- - "~>"
|
189
186
|
- !ruby/object:Gem::Version
|
190
|
-
version: '
|
187
|
+
version: '1.1'
|
191
188
|
type: :runtime
|
192
189
|
prerelease: false
|
193
190
|
version_requirements: !ruby/object:Gem::Requirement
|
194
191
|
requirements:
|
195
|
-
- - "
|
196
|
-
- !ruby/object:Gem::Version
|
197
|
-
version: '0'
|
198
|
-
- - "<"
|
192
|
+
- - "~>"
|
199
193
|
- !ruby/object:Gem::Version
|
200
|
-
version: '
|
194
|
+
version: '1.1'
|
201
195
|
description:
|
202
196
|
email:
|
203
197
|
- franco@mumuki.org
|
@@ -218,7 +212,6 @@ files:
|
|
218
212
|
- lib/mumukit/login/helpers/authentication_helpers.rb
|
219
213
|
- lib/mumukit/login/helpers/authorization_helpers.rb
|
220
214
|
- lib/mumukit/login/helpers/login_controller_helpers.rb
|
221
|
-
- lib/mumukit/login/helpers/user_permissions_helpers.rb
|
222
215
|
- lib/mumukit/login/mucookie.rb
|
223
216
|
- lib/mumukit/login/origin_redirector.rb
|
224
217
|
- lib/mumukit/login/profile.rb
|
@@ -252,7 +245,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
252
245
|
version: '0'
|
253
246
|
requirements: []
|
254
247
|
rubyforge_project:
|
255
|
-
rubygems_version: 2.7.
|
248
|
+
rubygems_version: 2.7.6
|
256
249
|
signing_key:
|
257
250
|
specification_version: 4
|
258
251
|
summary: Library for login mumuki requests
|
@@ -1,14 +0,0 @@
|
|
1
|
-
module Mumukit::Login::UserPermissionsHelpers
|
2
|
-
delegate :has_role?,
|
3
|
-
:add_permission!,
|
4
|
-
:remove_permission!,
|
5
|
-
:has_permission?,
|
6
|
-
:has_permission_delegation?,
|
7
|
-
:protect!,
|
8
|
-
:protect_delegation!,
|
9
|
-
:protect_permissions_assignment!, to: :permissions
|
10
|
-
|
11
|
-
def merge_permissions!(new_permissions)
|
12
|
-
self.permissions = permissions.merge(new_permissions)
|
13
|
-
end
|
14
|
-
end
|