entitlements-app 0.2.0 → 0.3.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: c0b8393072130c2348f10560cc2ed829d9045936f8b238e4a9c230e8396a7aeb
4
- data.tar.gz: 36ccfa87f131a77dccb415e70d3b352e46d5948166a94b01c1707823ba8c5002
3
+ metadata.gz: 1bd8c638dd9bdeadc6bb99cffe0c0e3e007ca441e67f0172b367b9cd84d3ba0c
4
+ data.tar.gz: 914db4acb1185e0ac3d092ab344ae2f63b3fd7a6a369687bd83fb52e900c8d90
5
5
  SHA512:
6
- metadata.gz: f19f0f0e6cb381725a2f2594751c4971dd18207c9b22965fe8bdc83170b99d199d101a85a6bdb051f0a8e47fc4560bf52a081ea19f52669e5eb1d72c358c1a47
7
- data.tar.gz: 514f5adbd9e7bebbaeb7a8901e2a764736ae2b64905bc0b8aabe32843913f23e38ae898a66490ea60adee0aece5699087f49492293371309745746dbb08420c0
6
+ metadata.gz: e0bd835babbab3d487896a412513a73be6a572806482a34b469910c197403f6c4c48a30ab36972d42f6a6f3102d56b6227a3bdcdb7e511db94627b1ad76113cc
7
+ data.tar.gz: 60a3d12cac94f5205ee16ff9dbeffc4b8e9a0128028c3eb0c937ab1e3625c19c33a1930669f256e6b59c879adb32eac7da2ba5e0319911551d1e15fe3b416fad
@@ -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)
data/lib/version.rb ADDED
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Entitlements
4
+ module Version
5
+ VERSION = "0.3.0"
6
+ end
7
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: entitlements-app
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
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
@@ -256,7 +256,6 @@ executables:
256
256
  extensions: []
257
257
  extra_rdoc_files: []
258
258
  files:
259
- - VERSION
260
259
  - bin/deploy-entitlements
261
260
  - lib/contracts-ruby2/CHANGELOG.markdown
262
261
  - lib/contracts-ruby2/Gemfile
@@ -478,11 +477,12 @@ files:
478
477
  - lib/entitlements/util/override.rb
479
478
  - lib/entitlements/util/util.rb
480
479
  - lib/ruby_version_check.rb
480
+ - lib/version.rb
481
481
  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: []
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 0.2.0