blacklight-access_controls 6.0.0 → 6.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.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/main.yml +31 -0
  3. data/.rubocop.yml +1 -4
  4. data/.rubocop_todo.yml +1 -1
  5. data/.solr_wrapper.yml +2 -0
  6. data/README.textile +3 -5
  7. data/Rakefile +2 -0
  8. data/VERSION +1 -1
  9. data/blacklight-access_controls.gemspec +4 -4
  10. data/lib/blacklight/access_controls/enforcement.rb +3 -2
  11. data/solr_conf/conf/_rest_managed.json +3 -0
  12. data/solr_conf/conf/admin-extra.html +12 -5
  13. data/solr_conf/conf/elevate.xml +1 -3
  14. data/solr_conf/conf/mapping-ISOLatin1Accent.txt +76 -76
  15. data/solr_conf/conf/schema.xml +257 -238
  16. data/solr_conf/conf/scripts.conf +24 -0
  17. data/solr_conf/conf/solrconfig.xml +104 -154
  18. data/solr_conf/conf/stopwords.txt +44 -0
  19. data/solr_conf/conf/{lang/stopwords_en.txt → stopwords_en.txt} +5 -1
  20. data/solr_conf/conf/synonyms.txt +5 -3
  21. data/solr_conf/conf/xslt/example.xsl +1 -1
  22. data/solr_conf/conf/xslt/example_atom.xsl +1 -1
  23. data/solr_conf/conf/xslt/example_rss.xsl +1 -1
  24. data/solr_conf/conf/xslt/luke.xsl +3 -3
  25. data/spec/factories/user.rb +1 -1
  26. data/spec/test_app_templates/lib/generators/test_app_generator.rb +1 -1
  27. data/spec/unit/blacklight/access_controls/search_builder_spec.rb +3 -5
  28. metadata +15 -70
  29. data/.travis.yml +0 -18
  30. data/solr_conf/conf/abc123 +0 -0
  31. data/solr_conf/conf/admin-extra.menu-bottom.html +0 -25
  32. data/solr_conf/conf/admin-extra.menu-top.html +0 -25
  33. data/solr_conf/conf/clustering/carrot2/kmeans-attributes.xml +0 -19
  34. data/solr_conf/conf/clustering/carrot2/lingo-attributes.xml +0 -24
  35. data/solr_conf/conf/clustering/carrot2/stc-attributes.xml +0 -19
  36. data/solr_conf/conf/currency.xml +0 -67
  37. data/solr_conf/conf/dataimport.properties +0 -3
  38. data/solr_conf/conf/db-data-config.xml +0 -93
  39. data/solr_conf/conf/lang/contractions_ca.txt +0 -8
  40. data/solr_conf/conf/lang/contractions_fr.txt +0 -15
  41. data/solr_conf/conf/lang/contractions_ga.txt +0 -5
  42. data/solr_conf/conf/lang/contractions_it.txt +0 -23
  43. data/solr_conf/conf/lang/hyphenations_ga.txt +0 -5
  44. data/solr_conf/conf/lang/stemdict_nl.txt +0 -6
  45. data/solr_conf/conf/lang/stoptags_ja.txt +0 -420
  46. data/solr_conf/conf/lang/stopwords_ar.txt +0 -125
  47. data/solr_conf/conf/lang/stopwords_bg.txt +0 -193
  48. data/solr_conf/conf/lang/stopwords_ca.txt +0 -220
  49. data/solr_conf/conf/lang/stopwords_ckb.txt +0 -136
  50. data/solr_conf/conf/lang/stopwords_cz.txt +0 -172
  51. data/solr_conf/conf/lang/stopwords_da.txt +0 -110
  52. data/solr_conf/conf/lang/stopwords_de.txt +0 -294
  53. data/solr_conf/conf/lang/stopwords_el.txt +0 -78
  54. data/solr_conf/conf/lang/stopwords_es.txt +0 -356
  55. data/solr_conf/conf/lang/stopwords_eu.txt +0 -99
  56. data/solr_conf/conf/lang/stopwords_fa.txt +0 -313
  57. data/solr_conf/conf/lang/stopwords_fi.txt +0 -97
  58. data/solr_conf/conf/lang/stopwords_fr.txt +0 -186
  59. data/solr_conf/conf/lang/stopwords_ga.txt +0 -110
  60. data/solr_conf/conf/lang/stopwords_gl.txt +0 -161
  61. data/solr_conf/conf/lang/stopwords_hi.txt +0 -235
  62. data/solr_conf/conf/lang/stopwords_hu.txt +0 -211
  63. data/solr_conf/conf/lang/stopwords_hy.txt +0 -46
  64. data/solr_conf/conf/lang/stopwords_id.txt +0 -359
  65. data/solr_conf/conf/lang/stopwords_it.txt +0 -303
  66. data/solr_conf/conf/lang/stopwords_ja.txt +0 -127
  67. data/solr_conf/conf/lang/stopwords_lv.txt +0 -172
  68. data/solr_conf/conf/lang/stopwords_nl.txt +0 -119
  69. data/solr_conf/conf/lang/stopwords_no.txt +0 -194
  70. data/solr_conf/conf/lang/stopwords_pt.txt +0 -253
  71. data/solr_conf/conf/lang/stopwords_ro.txt +0 -233
  72. data/solr_conf/conf/lang/stopwords_ru.txt +0 -243
  73. data/solr_conf/conf/lang/stopwords_sv.txt +0 -133
  74. data/solr_conf/conf/lang/stopwords_th.txt +0 -119
  75. data/solr_conf/conf/lang/stopwords_tr.txt +0 -212
  76. data/solr_conf/conf/lang/userdict_ja.txt +0 -29
  77. data/solr_conf/conf/mapping-FoldToASCII.txt +0 -3813
  78. data/solr_conf/conf/solrconfig.adams.xml +0 -1903
  79. data/solr_conf/conf/solrconfig.old.xml +0 -1634
  80. data/solr_conf/conf/solrconfig.xml.orig +0 -3531
  81. data/solr_conf/conf/update-script.js +0 -53
  82. data/solr_conf/conf/xslt/updateXml.xsl +0 -70
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2fa4c2281c3cf2d75a25711b2225ac638f3e1987682b3b6f154ee173f52f4a3a
4
- data.tar.gz: 1a84e0cf14c47d65c3821fbc374c6f071ff8cfd10123c900adc4559f8a8b772a
3
+ metadata.gz: 3b9fce315e1dd04f42137f6638ba01c3fd88db2c5abf5fcd81015c03ecf73889
4
+ data.tar.gz: c0537bab02b3b95c80841c4617eda10fe03acab1debd578d28b0dbb8b9468a42
5
5
  SHA512:
6
- metadata.gz: 052f22d4fcf11b8d60139421d0af1d374a0bb32483e5514c99adfa27d07f014a919cd729904775e33d12e1238c7b66b095d085e9c1c85904c1c1a115da772d45
7
- data.tar.gz: 0424e35387bb4ca3d6c9a8a7fcf1f1fbba9964c0fa36db4e45ee41d8c0ee3b4453c02d850712c4c88e4898153b8fad467ab180894c1ac205501dc016b48d5ea5
6
+ metadata.gz: 5c7484ef418484e7e91f26237eb35cd56d2fc04282deea8998b77db0747f5283634d5e0e0ece7eea55a35a421c9b07a8f6dbb8ed24cb24b86367a90623f95b2b
7
+ data.tar.gz: 708e32e0d761ad496750390e45dc17d70dac0748644310645972f8625e9007b5cc880134960ba7f682a895322bc4673c5991f8ed412eed8f5fb26b3ef3e51110
@@ -0,0 +1,31 @@
1
+ on:
2
+ push:
3
+ branches: [ "main" ]
4
+ pull_request:
5
+ branches: [ "main" ]
6
+
7
+ jobs:
8
+ test:
9
+ strategy:
10
+ fail-fast: false
11
+ matrix:
12
+ ruby_version: ['3.4.4', '3.3.8', '3.2.8']
13
+ rails_version: ['8.0.1', '7.2.2.1', '7.1.5.1']
14
+
15
+ runs-on: ubuntu-latest
16
+ name: ruby ${{ matrix.ruby_version }} | rails ${{ matrix.rails_version }}
17
+ env:
18
+ RAILS_VERSION: ${{ matrix.rails_version }}
19
+ ENGINE_CART_RAILS_OPTIONS: "--skip-git --skip-listen --skip-spring --skip-keeps --skip-kamal --skip-solid --skip-coffee --skip-test --skip-assets"
20
+ steps:
21
+ - name: Checkout code
22
+ uses: actions/checkout@v4
23
+ - name: Set up Ruby
24
+ uses: ruby/setup-ruby@v1
25
+ with:
26
+ bundler: "latest"
27
+ ruby-version: ${{ matrix.ruby_version }}
28
+ - name: Install dependencies
29
+ run: bundle install
30
+ - name: Run tests
31
+ run: bundle exec rake ci
data/.rubocop.yml CHANGED
@@ -16,7 +16,7 @@ Metrics/BlockLength:
16
16
  Exclude:
17
17
  - 'spec/**/*'
18
18
 
19
- Metrics/LineLength:
19
+ Layout/LineLength:
20
20
  Max: 185
21
21
 
22
22
  Naming/FileName:
@@ -25,9 +25,6 @@ Naming/FileName:
25
25
  - 'blacklight-access_controls.gemspec'
26
26
  - 'lib/blacklight-access_controls.rb'
27
27
 
28
- Rails:
29
- Enabled: true
30
-
31
28
  RSpec/MessageSpies:
32
29
  Enabled: false
33
30
 
data/.rubocop_todo.yml CHANGED
@@ -32,7 +32,7 @@ RSpec/ExampleLength:
32
32
 
33
33
  # Offense count: 3
34
34
  # Configuration parameters: CustomTransform, IgnoreMethods.
35
- RSpec/FilePath:
35
+ RSpec/SpecFilePathFormat:
36
36
  Exclude:
37
37
  - 'spec/unit/catalog_spec.rb'
38
38
  - 'spec/unit/config_spec.rb'
data/.solr_wrapper.yml CHANGED
@@ -1,5 +1,7 @@
1
1
  # Place any default configuration for solr_wrapper here
2
2
  # port: 8983
3
+ env:
4
+ SOLR_MODULES: analysis-extras
3
5
  collection:
4
6
  dir: solr_conf/conf/
5
7
  name: blacklight-core
data/README.textile CHANGED
@@ -89,10 +89,8 @@ This section contains information about working on the blacklight-access_control
89
89
  h3. Set up Solr
90
90
 
91
91
  <pre>
92
- $ bundle exec rake solr:clean
93
- $ bundle exec rake solr:config
94
- $ bundle exec rake solr:start
95
- $ bundle exec rake solr:stop
92
+ $ bundle exec solr_wrapper clean
93
+ $ bundle exec solr_wrapper
96
94
  </pre>
97
95
 
98
96
  h3. Generate a Rails test app
@@ -113,7 +111,7 @@ $ bundle exec rake solr:spec
113
111
  h3. Run the Rails server in development mode
114
112
 
115
113
  <pre>
116
- $ bundle exec rake solr:start
114
+ $ bundle exec solr_wrapper
117
115
  $ bundle exec rake engine_cart:generate
118
116
  $ bundle exec rake engine_cart:server
119
117
  </pre>
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  begin
2
4
  require 'bundler/setup'
3
5
  rescue LoadError
data/VERSION CHANGED
@@ -1 +1 @@
1
- 6.0.0
1
+ 6.1.0
@@ -3,7 +3,7 @@ version = File.read(File.expand_path('../VERSION', __FILE__)).strip
3
3
  module Blacklight
4
4
  module AccessControls
5
5
  def self.bl_version
6
- ENV['BLACKLIGHT_VERSION'] ? [ENV['BLACKLIGHT_VERSION']] : ['> 6.0', '< 8']
6
+ ENV['BLACKLIGHT_VERSION'] ? [ENV['BLACKLIGHT_VERSION']] : ['> 6.0', '< 9']
7
7
  end
8
8
  end
9
9
  end
@@ -26,15 +26,15 @@ Gem::Specification.new do |gem|
26
26
  gem.required_ruby_version = '>= 2.1.0'
27
27
 
28
28
  gem.add_dependency 'blacklight', *Blacklight::AccessControls.bl_version
29
- gem.add_dependency 'cancancan', '~> 1.8'
29
+ gem.add_dependency 'cancancan', '>= 1.8'
30
30
  gem.add_dependency 'deprecation', '~> 1.0'
31
31
 
32
32
  gem.add_development_dependency 'database_cleaner'
33
33
  gem.add_development_dependency 'engine_cart', '~> 2.2'
34
- gem.add_development_dependency 'factory_bot_rails', '~> 4.8'
34
+ gem.add_development_dependency 'factory_bot_rails', '>= 4.8'
35
35
  gem.add_development_dependency 'rake', '~> 12.3'
36
36
  gem.add_development_dependency 'rspec', '~> 3.1'
37
- gem.add_development_dependency 'rubocop', '~> 0.52.1'
37
+ gem.add_development_dependency 'rubocop', '~> 1.29'
38
38
  gem.add_development_dependency 'rubocop-rspec'
39
39
  gem.add_development_dependency 'solr_wrapper'
40
40
  end
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ require 'deprecation'
2
3
 
3
4
  module Blacklight
4
5
  module AccessControls
@@ -15,11 +16,11 @@ module Blacklight
15
16
  extend ActiveSupport::Concern
16
17
 
17
18
  included do
18
- extend Deprecation
19
+ extend ::Deprecation
19
20
  attr_writer :current_ability, :discovery_permissions
20
21
  deprecation_deprecate :current_ability=
21
22
 
22
- Deprecation.warn(self, 'Blacklight::AccessControls::Enforcement is deprecated and will be removed in 1.0')
23
+ ::Deprecation.warn(self, 'Blacklight::AccessControls::Enforcement is deprecated and will be removed in 1.0')
23
24
  class_attribute :solr_access_filters_logic
24
25
  alias_method :add_access_controls_to_solr_params, :apply_gated_discovery
25
26
 
@@ -0,0 +1,3 @@
1
+ {
2
+ "initArgs":{},
3
+ "managedList":[]}
@@ -15,10 +15,17 @@
15
15
  limitations under the License.
16
16
  -->
17
17
 
18
- <!-- The content of this page will be statically included into the top-
19
- right box of the cores overview page. Uncomment this as an example to
20
- see there the content will show up.
18
+ <!-- The content of this page will be statically included into the top
19
+ of the admin page. Uncomment this as an example to see there the content
20
+ will show up.
21
+
22
+ <hr>
23
+ <i>This line will appear before the first table</i>
24
+ <tr>
25
+ <td colspan="2">
26
+ This row will be appended to the end of the first table
27
+ </td>
28
+ </tr>
29
+ <hr>
21
30
 
22
- <img src="img/ico/construction.png"> This line will appear at the top-
23
- right box on collection1's Overview
24
31
  -->
@@ -19,10 +19,8 @@
19
19
  <!-- If this file is found in the config directory, it will only be
20
20
  loaded once at startup. If it is found in Solr's data
21
21
  directory, it will be re-loaded every commit.
22
-
23
- See http://wiki.apache.org/solr/QueryElevationComponent for more info
24
-
25
22
  -->
23
+
26
24
  <elevate>
27
25
  <query text="foo bar">
28
26
  <doc id="1" />
@@ -16,231 +16,231 @@
16
16
  # "target".length() >= 0 (target can be empty.)
17
17
 
18
18
  # example:
19
- # "À" => "A"
19
+ # "??" => "A"
20
20
  # "\u00C0" => "A"
21
21
  # "\u00C0" => "\u0041"
22
- # "ß" => "ss"
22
+ # "??" => "ss"
23
23
  # "\t" => " "
24
24
  # "\n" => ""
25
25
 
26
- # À => A
26
+ # ?? => A
27
27
  "\u00C0" => "A"
28
28
 
29
- # Á => A
29
+ # ?? => A
30
30
  "\u00C1" => "A"
31
31
 
32
- # Â => A
32
+ # ?? => A
33
33
  "\u00C2" => "A"
34
34
 
35
- # Ã => A
35
+ # ?? => A
36
36
  "\u00C3" => "A"
37
37
 
38
- # Ä => A
38
+ # ?? => A
39
39
  "\u00C4" => "A"
40
40
 
41
- # Å => A
41
+ # ?? => A
42
42
  "\u00C5" => "A"
43
43
 
44
- # Æ => AE
44
+ # ?? => AE
45
45
  "\u00C6" => "AE"
46
46
 
47
- # Ç => C
47
+ # ?? => C
48
48
  "\u00C7" => "C"
49
49
 
50
- # È => E
50
+ # ?? => E
51
51
  "\u00C8" => "E"
52
52
 
53
- # É => E
53
+ # ?? => E
54
54
  "\u00C9" => "E"
55
55
 
56
- # Ê => E
56
+ # ?? => E
57
57
  "\u00CA" => "E"
58
58
 
59
- # Ë => E
59
+ # ?? => E
60
60
  "\u00CB" => "E"
61
61
 
62
- # Ì => I
62
+ # ?? => I
63
63
  "\u00CC" => "I"
64
64
 
65
- # Í => I
65
+ # ?? => I
66
66
  "\u00CD" => "I"
67
67
 
68
- # Î => I
68
+ # ?? => I
69
69
  "\u00CE" => "I"
70
70
 
71
- # Ï => I
71
+ # ?? => I
72
72
  "\u00CF" => "I"
73
73
 
74
- # IJ => IJ
74
+ # ?? => IJ
75
75
  "\u0132" => "IJ"
76
76
 
77
- # Ð => D
77
+ # ?? => D
78
78
  "\u00D0" => "D"
79
79
 
80
- # Ñ => N
80
+ # ?? => N
81
81
  "\u00D1" => "N"
82
82
 
83
- # Ò => O
83
+ # ?? => O
84
84
  "\u00D2" => "O"
85
85
 
86
- # Ó => O
86
+ # ?? => O
87
87
  "\u00D3" => "O"
88
88
 
89
- # Ô => O
89
+ # ?? => O
90
90
  "\u00D4" => "O"
91
91
 
92
- # Õ => O
92
+ # ?? => O
93
93
  "\u00D5" => "O"
94
94
 
95
- # Ö => O
95
+ # ?? => O
96
96
  "\u00D6" => "O"
97
97
 
98
- # Ø => O
98
+ # ?? => O
99
99
  "\u00D8" => "O"
100
100
 
101
- # Œ => OE
101
+ # ?? => OE
102
102
  "\u0152" => "OE"
103
103
 
104
- # Þ
104
+ # ??
105
105
  "\u00DE" => "TH"
106
106
 
107
- # Ù => U
107
+ # ?? => U
108
108
  "\u00D9" => "U"
109
109
 
110
- # Ú => U
110
+ # ?? => U
111
111
  "\u00DA" => "U"
112
112
 
113
- # Û => U
113
+ # ?? => U
114
114
  "\u00DB" => "U"
115
115
 
116
- # Ü => U
116
+ # ?? => U
117
117
  "\u00DC" => "U"
118
118
 
119
- # Ý => Y
119
+ # ?? => Y
120
120
  "\u00DD" => "Y"
121
121
 
122
- # Ÿ => Y
122
+ # ?? => Y
123
123
  "\u0178" => "Y"
124
124
 
125
- # à => a
125
+ # ?? => a
126
126
  "\u00E0" => "a"
127
127
 
128
- # á => a
128
+ # ?? => a
129
129
  "\u00E1" => "a"
130
130
 
131
- # â => a
131
+ # ?? => a
132
132
  "\u00E2" => "a"
133
133
 
134
- # ã => a
134
+ # ?? => a
135
135
  "\u00E3" => "a"
136
136
 
137
- # ä => a
137
+ # ?? => a
138
138
  "\u00E4" => "a"
139
139
 
140
- # å => a
140
+ # ?? => a
141
141
  "\u00E5" => "a"
142
142
 
143
- # æ => ae
143
+ # ?? => ae
144
144
  "\u00E6" => "ae"
145
145
 
146
- # ç => c
146
+ # ?? => c
147
147
  "\u00E7" => "c"
148
148
 
149
- # è => e
149
+ # ?? => e
150
150
  "\u00E8" => "e"
151
151
 
152
- # é => e
152
+ # ?? => e
153
153
  "\u00E9" => "e"
154
154
 
155
- # ê => e
155
+ # ?? => e
156
156
  "\u00EA" => "e"
157
157
 
158
- # ë => e
158
+ # ?? => e
159
159
  "\u00EB" => "e"
160
160
 
161
- # ì => i
161
+ # ?? => i
162
162
  "\u00EC" => "i"
163
163
 
164
- # í => i
164
+ # ?? => i
165
165
  "\u00ED" => "i"
166
166
 
167
- # î => i
167
+ # ?? => i
168
168
  "\u00EE" => "i"
169
169
 
170
- # ï => i
170
+ # ?? => i
171
171
  "\u00EF" => "i"
172
172
 
173
- # ij => ij
173
+ # ?? => ij
174
174
  "\u0133" => "ij"
175
175
 
176
- # ð => d
176
+ # ?? => d
177
177
  "\u00F0" => "d"
178
178
 
179
- # ñ => n
179
+ # ?? => n
180
180
  "\u00F1" => "n"
181
181
 
182
- # ò => o
182
+ # ?? => o
183
183
  "\u00F2" => "o"
184
184
 
185
- # ó => o
185
+ # ?? => o
186
186
  "\u00F3" => "o"
187
187
 
188
- # ô => o
188
+ # ?? => o
189
189
  "\u00F4" => "o"
190
190
 
191
- # õ => o
191
+ # ?? => o
192
192
  "\u00F5" => "o"
193
193
 
194
- # ö => o
194
+ # ?? => o
195
195
  "\u00F6" => "o"
196
196
 
197
- # ø => o
197
+ # ?? => o
198
198
  "\u00F8" => "o"
199
199
 
200
- # œ => oe
200
+ # ?? => oe
201
201
  "\u0153" => "oe"
202
202
 
203
- # ß => ss
203
+ # ?? => ss
204
204
  "\u00DF" => "ss"
205
205
 
206
- # þ => th
206
+ # ?? => th
207
207
  "\u00FE" => "th"
208
208
 
209
- # ù => u
209
+ # ?? => u
210
210
  "\u00F9" => "u"
211
211
 
212
- # ú => u
212
+ # ?? => u
213
213
  "\u00FA" => "u"
214
214
 
215
- # û => u
215
+ # ?? => u
216
216
  "\u00FB" => "u"
217
217
 
218
- # ü => u
218
+ # ?? => u
219
219
  "\u00FC" => "u"
220
220
 
221
- # ý => y
221
+ # ?? => y
222
222
  "\u00FD" => "y"
223
223
 
224
- # ÿ => y
224
+ # ?? => y
225
225
  "\u00FF" => "y"
226
226
 
227
- # => ff
227
+ # ??? => ff
228
228
  "\uFB00" => "ff"
229
229
 
230
- # => fi
230
+ # ??? => fi
231
231
  "\uFB01" => "fi"
232
232
 
233
- # => fl
233
+ # ??? => fl
234
234
  "\uFB02" => "fl"
235
235
 
236
- # => ffi
236
+ # ??? => ffi
237
237
  "\uFB03" => "ffi"
238
238
 
239
- # => ffl
239
+ # ??? => ffl
240
240
  "\uFB04" => "ffl"
241
241
 
242
- # => ft
242
+ # ??? => ft
243
243
  "\uFB05" => "ft"
244
244
 
245
- # => st
245
+ # ??? => st
246
246
  "\uFB06" => "st"