hubssolib 4.0.2 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f56f69bd23843c0ff1575651e4a01eb111f121363ad046c0e3356ec14bdb5dcf
4
- data.tar.gz: f05e756267b131d91d3e3d71752781a33050cbd8b903cbe61d213614d229fe3d
3
+ metadata.gz: 3ac7aac883d6ab5797e7ecf31b4c486cc4533a8e7084c7862ee9ee9f8588212d
4
+ data.tar.gz: 607e1f16fb5cf77901eb89ccdecabd7bb72a27d32b68c3cc17daaa910b974916
5
5
  SHA512:
6
- metadata.gz: c3fb0fe6bd80d59959116218cddb8d328e0cfeddd1de858ad352eb7fa3bf439237510a63695a057dd5d488bfd2a8027921f683b50ea7161343daf3983cd75fa8
7
- data.tar.gz: e637ddc3a7d73ad9892d8d17176d464485a501c6c60a045bb54551fb6bb2d5bc2c32dca9f80bceccba7c51b76216d664e40efcbc94a3116427f46e33f5854441
6
+ metadata.gz: dc11c4408e4ef094fdc7100b23faffaa7633fe2987e2c61e4aff16089834b7ea5d80775ecb53e705aa85073ca476f85ffedc9bb3cfed458ae68367e68bddac31
7
+ data.tar.gz: 9669f82cc180c9e1079b38dffc2e2e521ba2cb9fef9c602dfa3e48d68f07fcb677718b7abec0b254e5f9e37c333b2330f61949b53cadf02d66d83582f53f22f9
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 4.1.0, 31-Jul-2026
2
+
3
+ * Adds the concept of suspended Hub users. A Hub user with `user_suspended_at` set will always act as if logged out. This is backwards compatible, since the attribute when unset / `nil` means "not suspended".
4
+
5
+
1
6
  ## 4.0.0, 4.0.1 and 4.0.2, 24-Jul-2026
2
7
 
3
8
  * Despite the major version bump, this is a maintenance release for client apps. Integration for all Hub features including the Hub Trust mechanism is unchanged.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- hubssolib (4.0.1)
4
+ hubssolib (4.0.2)
5
5
  base64 (~> 0.2)
6
6
  drb (~> 2.2)
7
7
 
@@ -10,29 +10,29 @@ GEM
10
10
  specs:
11
11
  action_text-trix (2.1.19)
12
12
  railties
13
- actioncable (8.1.3)
14
- actionpack (= 8.1.3)
15
- activesupport (= 8.1.3)
13
+ actioncable (8.1.3.1)
14
+ actionpack (= 8.1.3.1)
15
+ activesupport (= 8.1.3.1)
16
16
  nio4r (~> 2.0)
17
17
  websocket-driver (>= 0.6.1)
18
18
  zeitwerk (~> 2.6)
19
- actionmailbox (8.1.3)
20
- actionpack (= 8.1.3)
21
- activejob (= 8.1.3)
22
- activerecord (= 8.1.3)
23
- activestorage (= 8.1.3)
24
- activesupport (= 8.1.3)
19
+ actionmailbox (8.1.3.1)
20
+ actionpack (= 8.1.3.1)
21
+ activejob (= 8.1.3.1)
22
+ activerecord (= 8.1.3.1)
23
+ activestorage (= 8.1.3.1)
24
+ activesupport (= 8.1.3.1)
25
25
  mail (>= 2.8.0)
26
- actionmailer (8.1.3)
27
- actionpack (= 8.1.3)
28
- actionview (= 8.1.3)
29
- activejob (= 8.1.3)
30
- activesupport (= 8.1.3)
26
+ actionmailer (8.1.3.1)
27
+ actionpack (= 8.1.3.1)
28
+ actionview (= 8.1.3.1)
29
+ activejob (= 8.1.3.1)
30
+ activesupport (= 8.1.3.1)
31
31
  mail (>= 2.8.0)
32
32
  rails-dom-testing (~> 2.2)
33
- actionpack (8.1.3)
34
- actionview (= 8.1.3)
35
- activesupport (= 8.1.3)
33
+ actionpack (8.1.3.1)
34
+ actionview (= 8.1.3.1)
35
+ activesupport (= 8.1.3.1)
36
36
  nokogiri (>= 1.8.5)
37
37
  rack (>= 2.2.4)
38
38
  rack-session (>= 1.0.1)
@@ -40,36 +40,36 @@ GEM
40
40
  rails-dom-testing (~> 2.2)
41
41
  rails-html-sanitizer (~> 1.6)
42
42
  useragent (~> 0.16)
43
- actiontext (8.1.3)
43
+ actiontext (8.1.3.1)
44
44
  action_text-trix (~> 2.1.15)
45
- actionpack (= 8.1.3)
46
- activerecord (= 8.1.3)
47
- activestorage (= 8.1.3)
48
- activesupport (= 8.1.3)
45
+ actionpack (= 8.1.3.1)
46
+ activerecord (= 8.1.3.1)
47
+ activestorage (= 8.1.3.1)
48
+ activesupport (= 8.1.3.1)
49
49
  globalid (>= 0.6.0)
50
50
  nokogiri (>= 1.8.5)
51
- actionview (8.1.3)
52
- activesupport (= 8.1.3)
51
+ actionview (8.1.3.1)
52
+ activesupport (= 8.1.3.1)
53
53
  builder (~> 3.1)
54
54
  erubi (~> 1.11)
55
55
  rails-dom-testing (~> 2.2)
56
56
  rails-html-sanitizer (~> 1.6)
57
- activejob (8.1.3)
58
- activesupport (= 8.1.3)
57
+ activejob (8.1.3.1)
58
+ activesupport (= 8.1.3.1)
59
59
  globalid (>= 0.3.6)
60
- activemodel (8.1.3)
61
- activesupport (= 8.1.3)
62
- activerecord (8.1.3)
63
- activemodel (= 8.1.3)
64
- activesupport (= 8.1.3)
60
+ activemodel (8.1.3.1)
61
+ activesupport (= 8.1.3.1)
62
+ activerecord (8.1.3.1)
63
+ activemodel (= 8.1.3.1)
64
+ activesupport (= 8.1.3.1)
65
65
  timeout (>= 0.4.0)
66
- activestorage (8.1.3)
67
- actionpack (= 8.1.3)
68
- activejob (= 8.1.3)
69
- activerecord (= 8.1.3)
70
- activesupport (= 8.1.3)
66
+ activestorage (8.1.3.1)
67
+ actionpack (= 8.1.3.1)
68
+ activejob (= 8.1.3.1)
69
+ activerecord (= 8.1.3.1)
70
+ activesupport (= 8.1.3.1)
71
71
  marcel (~> 1.0)
72
- activesupport (8.1.3)
72
+ activesupport (8.1.3.1)
73
73
  base64
74
74
  bigdecimal
75
75
  concurrent-ruby (~> 1.0, >= 1.3.1)
@@ -152,20 +152,20 @@ GEM
152
152
  rack (>= 1.3)
153
153
  rackup (2.3.1)
154
154
  rack (>= 3)
155
- rails (8.1.3)
156
- actioncable (= 8.1.3)
157
- actionmailbox (= 8.1.3)
158
- actionmailer (= 8.1.3)
159
- actionpack (= 8.1.3)
160
- actiontext (= 8.1.3)
161
- actionview (= 8.1.3)
162
- activejob (= 8.1.3)
163
- activemodel (= 8.1.3)
164
- activerecord (= 8.1.3)
165
- activestorage (= 8.1.3)
166
- activesupport (= 8.1.3)
155
+ rails (8.1.3.1)
156
+ actioncable (= 8.1.3.1)
157
+ actionmailbox (= 8.1.3.1)
158
+ actionmailer (= 8.1.3.1)
159
+ actionpack (= 8.1.3.1)
160
+ actiontext (= 8.1.3.1)
161
+ actionview (= 8.1.3.1)
162
+ activejob (= 8.1.3.1)
163
+ activemodel (= 8.1.3.1)
164
+ activerecord (= 8.1.3.1)
165
+ activestorage (= 8.1.3.1)
166
+ activesupport (= 8.1.3.1)
167
167
  bundler (>= 1.15.0)
168
- railties (= 8.1.3)
168
+ railties (= 8.1.3.1)
169
169
  rails-dom-testing (2.3.0)
170
170
  activesupport (>= 5.0.0)
171
171
  minitest
@@ -173,9 +173,9 @@ GEM
173
173
  rails-html-sanitizer (1.7.1)
174
174
  loofah (~> 2.25, >= 2.25.2)
175
175
  nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
176
- railties (8.1.3)
177
- actionpack (= 8.1.3)
178
- activesupport (= 8.1.3)
176
+ railties (8.1.3.1)
177
+ actionpack (= 8.1.3.1)
178
+ activesupport (= 8.1.3.1)
179
179
  irb (~> 1.13)
180
180
  rackup (>= 1.0.0)
181
181
  rake (>= 12.2)
@@ -183,7 +183,7 @@ GEM
183
183
  tsort (>= 0.2)
184
184
  zeitwerk (~> 2.6)
185
185
  rake (13.4.2)
186
- rbs (4.0.3)
186
+ rbs (4.1.1)
187
187
  logger
188
188
  prism (>= 1.6.0)
189
189
  tsort
data/hubssolib.gemspec CHANGED
@@ -4,7 +4,7 @@ spec = Gem::Specification.new do |s|
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.name = 'hubssolib'
6
6
 
7
- s.version = '4.0.2'
7
+ s.version = '4.1.0'
8
8
  s.author = 'Andrew Hodgkinson and others'
9
9
  s.email = 'ahodgkin@rowing.org.uk'
10
10
  s.homepage = 'http://pond.org.uk/'
data/lib/hub_sso_lib.rb CHANGED
@@ -376,22 +376,23 @@ module HubSsoLib
376
376
  #
377
377
  class User
378
378
 
379
- attr_accessor :user_salt
380
- attr_accessor :user_roles
381
- attr_accessor :user_updated_at
382
379
  attr_accessor :user_activated_at
383
- attr_accessor :user_real_name
384
- attr_accessor :user_crypted_password
385
- attr_accessor :user_remember_token_expires_at
386
380
  attr_accessor :user_activation_code
387
- attr_accessor :user_member_id
381
+ attr_accessor :user_created_at
382
+ attr_accessor :user_crypted_password
383
+ attr_accessor :user_email
388
384
  attr_accessor :user_id
385
+ attr_accessor :user_member_id
389
386
  attr_accessor :user_password_reset_code
390
- attr_accessor :user_remember_token
391
- attr_accessor :user_email
392
- attr_accessor :user_created_at
393
387
  attr_accessor :user_password_reset_code_expires_at
388
+ attr_accessor :user_real_name
389
+ attr_accessor :user_remember_token
390
+ attr_accessor :user_remember_token_expires_at
391
+ attr_accessor :user_roles
392
+ attr_accessor :user_salt
393
+ attr_accessor :user_suspended_at
394
394
  attr_accessor :user_trusted
395
+ attr_accessor :user_updated_at
395
396
 
396
397
  end # User class
397
398
 
@@ -1052,7 +1053,11 @@ module HubSsoLib
1052
1053
  hub_session = self.hubssolib_get_session()
1053
1054
  user = hub_session&.session_user
1054
1055
 
1055
- return (user&.user_id.nil? ? nil : user)
1056
+ if user.nil? or user.user_id.nil? or ! user.user_suspended_at.nil?
1057
+ return nil
1058
+ else
1059
+ return user
1060
+ end
1056
1061
  end
1057
1062
 
1058
1063
  # Sets the currently signed in user. Note that although this works and is
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hubssolib
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.2
4
+ version: 4.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Hodgkinson and others