entitlements 0.2.0 → 0.2.1

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: 1347fba6ae86ee99f57197891fcc00a6769fc1ea7215e1fe886ea6e694750117
4
- data.tar.gz: '068602eae09ba64f28b9a73b6ef5190909e968ccee2708e6bd5d4aa268324133'
3
+ metadata.gz: 15e2bf1cda5f95a547a113eb6fb7ac91663c9ccb9ef3a1a8cc3dc8640c594298
4
+ data.tar.gz: a2596bb68a63682d3b638f130fa6821165abf4fda761824e3f9eee46df44d8bf
5
5
  SHA512:
6
- metadata.gz: 99cf810b612a0e05aa854d0ab0971e6b7ba3254c0768e89987fa364c54d0b85e8020f6a66a15a0cf384378e5e55acdc45e2906c325893895976c9880fe092eed
7
- data.tar.gz: 74fbbb0d3406ce8a6db35646287b1bebb46c2a1a1d19c31b6521659b651f7c89f1889d3932085df98f717dce574c39fe96ba9fb380041263f33fb8feae2ba15d
6
+ metadata.gz: 21313c30d52a95db45ee1a892c01c9fbc0ef78fa521f1fd63f73ad5c4429769c729a63b82c633a89f316115d2766cd30e1748a3ed020cde8bf1acedccd8e70ce
7
+ data.tar.gz: 8b3ff285532ad51b6b159fac48ce272d57159ef27c1d66ac1a447f3b3275d59e517fcece9907bfabddaeafc5a529ad6119aec86d83c54ba3cf507a3f7244b6d2
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.0
1
+ 0.2.1
@@ -213,6 +213,7 @@ module Entitlements
213
213
  # Returns true if expired, false if not expired.
214
214
  Contract C::Or[nil, String], String => C::Or[nil, C::Bool]
215
215
  def expired?(expiration, context)
216
+ return false if Entitlements.config.fetch("ignore_expirations", false)
216
217
  return false if expiration.nil? || expiration.strip.empty?
217
218
  if expiration =~ /\A(\d{4})-(\d{2})-(\d{2})\z/
218
219
  year, month, day = Regexp.last_match(1).to_i, Regexp.last_match(2).to_i, Regexp.last_match(3).to_i
@@ -22,6 +22,7 @@ module Entitlements
22
22
  # Return true if we made any changes, false otherwise.
23
23
  Contract C::SetOf[Entitlements::Models::Person] => C::Bool
24
24
  def modify(result)
25
+ return false if Entitlements.config.fetch("ignore_expirations", false)
25
26
  # If group is already empty, we have nothing to consider modifying, regardless
26
27
  # of expiration date. Just return false right away.
27
28
  if result.empty?
@@ -239,8 +239,6 @@ module Entitlements
239
239
  verify_mode: @disable_ssl_verification ? OpenSSL::SSL::VERIFY_NONE : OpenSSL::SSL::VERIFY_PEER
240
240
  }
241
241
  }
242
- else
243
- ldap_options[:encryption] = { method: nil }
244
242
  end
245
243
 
246
244
  if @ca_file && ldap_options[:encryption].key?(:tls_options)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: entitlements
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitHub, Inc. Security Ops
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-14 00:00:00.000000000 Z
11
+ date: 2023-08-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby
@@ -482,7 +482,7 @@ homepage: https://github.com/github/entitlements-app
482
482
  licenses:
483
483
  - MIT
484
484
  metadata: {}
485
- post_install_message:
485
+ post_install_message:
486
486
  rdoc_options: []
487
487
  require_paths:
488
488
  - lib
@@ -498,7 +498,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
498
498
  version: '0'
499
499
  requirements: []
500
500
  rubygems_version: 3.3.7
501
- signing_key:
501
+ signing_key:
502
502
  specification_version: 4
503
503
  summary: git-managed LDAP group configurations
504
504
  test_files: []