drillbit 2.1.0 → 2.2.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
  SHA1:
3
- metadata.gz: 1b0722486e3348f08a8bdc4738993706215910d5
4
- data.tar.gz: b978c35838ba619d4bf4ad1dc808b4f4b99dcd98
3
+ metadata.gz: bca9c34aa017e24eee6166e02ddf7781a7f8e8c0
4
+ data.tar.gz: 9ce4529a2cde4d3fc81bcd17b7e21cd71ea5d5ff
5
5
  SHA512:
6
- metadata.gz: 37e73c70b11476d9e98cb25e3eee61703b00caba5c37fcd2e30e6de3f4c471c80782905578ee57b5a65fef98898d6e0a9adfd7806768b14b1a80e80fb6c0ce7d
7
- data.tar.gz: 4512cbf49593cf627be82c63b7d8a594a20bcf375be78e679051d5e701cf51d7f5d67355b34498ba68ae6463a3c75155a90c7f533264fbaffc97ce175318b867
6
+ metadata.gz: 95c93eb1ffa16512843587aacf7489b3816bc691a2bf829674b1a925c314f69e7a94e2d5719c29e686654a465ff72d05159a583c9d188f9397d629f8963dd13a
7
+ data.tar.gz: a0f658423619d88c6351cde8b22196d3d2a456cfa5f4221106bd904728d06638e97355b4435dbe4f0049b95e6942c3175eec76e0e22d023898aa5e312fb777d9
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -46,21 +46,20 @@ class Filtering < Authorizers::Parameters
46
46
  end
47
47
  end
48
48
 
49
- # :reek:ControlParameter
50
49
  # :reek:BooleanParameter
51
50
  # :reek:DuplicateMethodCall
52
- def filter_by_authenticated_owner(owner_id_name:,
53
- owner_id_value:,
54
- even_if_not_passed_in: true,
55
- override_if_admin: false)
51
+ def override_filter_parameter(name:,
52
+ value:,
53
+ only_when_present: false,
54
+ override_if_admin: false)
55
+
56
+ add_filterable_parameter name
56
57
 
57
58
  return true if !override_if_admin && token.admin?
58
59
 
59
60
  params[:filter] ||= {}
60
61
 
61
- if params[:filter][owner_id_name] || even_if_not_passed_in
62
- params[:filter][owner_id_name] = owner_id_value
63
- end
62
+ params[:filter][name] = value if params[:filter][name] || !only_when_present
64
63
  end
65
64
  end
66
65
  end
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Drillbit
3
- VERSION = '2.1.0'
3
+ VERSION = '2.2.0'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: drillbit
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - thegranddesign
metadata.gz.sig CHANGED
Binary file