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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6830bf41ebf3fdf46258a49da9567bf67ceafff303dd9117b3485a8a6ea5faf2
4
- data.tar.gz: ad9bd5fb469e863c651015dc562179bba1bd4479efc76e80a90e28c9ad62d59c
3
+ metadata.gz: 8d27bffe5261f65a85d9f6491afff8dde964f88ef128fa2c16679d7b53304689
4
+ data.tar.gz: a91ab61c156b87d045cad2cf6bc2d2303381e13acb020f19a9321b938436ee09
5
5
  SHA512:
6
- metadata.gz: f0c22ad75903e2d1cd7cae074d8284af25b29e4f6ca830d42e08cdc5f5c31663464a1f12eb3f7df8815e52bb54221d6d53711b297c859f701351b8535b541f7b
7
- data.tar.gz: 2802494267876c9e61404de855faff8730e091f788063803934c7040cb8adcbcc93cab38c7ec08896ad0bc45a37efec43b49196658370697db673dbd02923065
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::Login.config.user_class.find_by_uid!(current_user_uid) if current_user?
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::Login.config.user_class.for_profile profile
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
@@ -1,4 +1,3 @@
1
1
  require_relative './helpers/authentication_helpers'
2
2
  require_relative './helpers/authorization_helpers'
3
3
  require_relative './helpers/login_controller_helpers'
4
- require_relative './helpers/user_permissions_helpers'
@@ -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
@@ -1,5 +1,5 @@
1
1
  module Mumukit
2
2
  module Login
3
- VERSION = '4.4.0'
3
+ VERSION = '5.0.0'
4
4
  end
5
5
  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.4.0
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-08 00:00:00.000000000 Z
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: '2'
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: '2'
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.5
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