blacklight-access_controls 0.5.0 → 0.5.1

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: df1f39af20b67cfc2e2c67c604b555349db0974f
4
- data.tar.gz: fff1a1c47059217f4469cc263407787f12a66cd4
3
+ metadata.gz: 9848df97495a043646fee764f7dda99465041821
4
+ data.tar.gz: ba6e8f65ea7ed2c7968867b6b6e218b934e73379
5
5
  SHA512:
6
- metadata.gz: 4744d9de092e65196a7a3a7be04981496fff4277eb2fb48cfad7efb14ae2b6878c14562cd40149e95b812c2b7c28e8c97e6ac56ea92600281a6482bdbe541fb3
7
- data.tar.gz: a42057263e9c5cd3fe599f4f833b0a18b0a26891fd0f31f64bd4d38ce39ec7043d0a6c590a9543477ff67e2e5cf00488c321c309b8e4364b93e3fc1be32926e4
6
+ metadata.gz: c8530328e2494fc97e1646af356c6112437d192c2fcd7e7524cf728dc0442af1501dd06e5719a1a326d9fbc6bf92d74a57c798007418aaa944d229788270643a
7
+ data.tar.gz: 3979b92c05c708de3f47ab486abdeda3e383ad50369cdb3d04210c69e8bc701d328cc94ec042ecd409b4068828739a21c1d1affccf3f750beece6b552aa9b5a6
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.0
1
+ 0.5.1
@@ -70,7 +70,7 @@ module Blacklight
70
70
  # for groups
71
71
  permission_types.map do |type|
72
72
  field = solr_field_for(type, 'group')
73
- groups = ability.user_groups.map { |g| escape_value(g) }
73
+ groups = ability.user_groups
74
74
  # The parens are required to properly OR the cases together.
75
75
  "({!terms f=#{field}}#{groups.join(',')})"
76
76
  end
@@ -47,8 +47,8 @@ describe Blacklight::AccessControls::Enforcement do
47
47
  end
48
48
 
49
49
  it "searches for my groups" do
50
- expect(@solr_parameters[:fq].first).to match(%r{\{!terms f=discover_access_group_ssim\}public,faculty,africana\\-faculty,registered})
51
- expect(@solr_parameters[:fq].first).to match(%r{\{!terms f=read_access_group_ssim\}public,faculty,africana\\-faculty,registered})
50
+ expect(@solr_parameters[:fq].first).to match(%r{\{!terms f=discover_access_group_ssim\}public,faculty,africana-faculty,registered})
51
+ expect(@solr_parameters[:fq].first).to match(%r{\{!terms f=read_access_group_ssim\}public,faculty,africana-faculty,registered})
52
52
  end
53
53
 
54
54
  it "searches for my user key" do
@@ -106,27 +106,27 @@ describe Blacklight::AccessControls::Enforcement do
106
106
  context 'slashes in the group names' do
107
107
  let(:groups) { ["abc/123","cde/567"] }
108
108
 
109
- it "should escape slashes" do
110
- expect(@solr_parameters[:fq].first).to match(%r{\{!terms f=discover_access_group_ssim\}public,abc\\/123,cde\\/567,registered})
111
- expect(@solr_parameters[:fq].first).to match(%r{\{!terms f=read_access_group_ssim\}public,abc\\/123,cde\\/567,registered})
109
+ it "doesn't escape slashes" do
110
+ expect(@solr_parameters[:fq].first).to match(%r{\{!terms f=discover_access_group_ssim\}public,abc/123,cde/567,registered})
111
+ expect(@solr_parameters[:fq].first).to match(%r{\{!terms f=read_access_group_ssim\}public,abc/123,cde/567,registered})
112
112
  end
113
113
  end
114
114
 
115
115
  context 'spaces in the group names' do
116
116
  let(:groups) { ["abc 123","cd/e 567"] }
117
117
 
118
- it "escapes spaces in group names" do
119
- expect(@solr_parameters[:fq].first).to match(%r{\{!terms f=discover_access_group_ssim\}public,abc\\ 123,cd\\/e\\ 567,registered})
120
- expect(@solr_parameters[:fq].first).to match(%r{\{!terms f=read_access_group_ssim\}public,abc\\ 123,cd\\/e\\ 567,registered})
118
+ it "doesn't escape spaces in group names" do
119
+ expect(@solr_parameters[:fq].first).to match(%r{\{!terms f=discover_access_group_ssim\}public,abc 123,cd/e 567,registered})
120
+ expect(@solr_parameters[:fq].first).to match(%r{\{!terms f=read_access_group_ssim\}public,abc 123,cd/e 567,registered})
121
121
  end
122
122
  end
123
123
 
124
124
  context 'colons in the groups names' do
125
125
  let(:groups) { ["abc:123","cde:567"] }
126
126
 
127
- it "should escape colons" do
128
- expect(@solr_parameters[:fq].first).to match(%r{\{!terms f=discover_access_group_ssim\}public,abc\\:123,cde\\:567,registered})
129
- expect(@solr_parameters[:fq].first).to match(%r{\{!terms f=read_access_group_ssim\}public,abc\\:123,cde\\:567,registered})
127
+ it "doesn't escape colons" do
128
+ expect(@solr_parameters[:fq].first).to match(%r{\{!terms f=discover_access_group_ssim\}public,abc:123,cde:567,registered})
129
+ expect(@solr_parameters[:fq].first).to match(%r{\{!terms f=read_access_group_ssim\}public,abc:123,cde:567,registered})
130
130
  end
131
131
  end
132
132
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blacklight-access_controls
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Beer