hydra-access-controls 6.4.0.rc5 → 6.4.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: 76381cfbb357cec68b454fdbd3063282f75eb4d4
4
- data.tar.gz: 55598936df275fb7a52d2ff5d9395cd004914062
3
+ metadata.gz: 550f14aaf46093d42a43ab926b41d29c00ec370d
4
+ data.tar.gz: de0348503df87083363d268918cda3c9060f3649
5
5
  SHA512:
6
- metadata.gz: 3607135f5aa9afae8abb1d026a0379993461144a9aba78e881c5c39283161bff14b2b916923c0218ccad67a92f7da25452a209ef727d6d63c42fe4c119e0ce5f
7
- data.tar.gz: cc97938c99770ca31edf253d21f660b8bb0e54954f4a5469f90e26e85c4c7472a5995c5a00fc3ae6ffc3b97d7e7c50ce87daef34d264aae1c2e8b5912860a807
6
+ metadata.gz: 6c317e27b93d56b80332b0a0d52a91a0141afbff106b89e429109ea664d63e1546a29307b2fa9d69ee93b89cab0ff823bd694d0e9f732d7fbe6a7780ef555bda
7
+ data.tar.gz: af750abded990c0d4bf727f74f005e11aee1cc199fa3c752a0b5c3cd139cd41866fc2412d003a98f89fc8827adf394aee51e319f04aa3574f9b2f200976aacb0
@@ -77,7 +77,7 @@ In config/initializers/hydra_config.rb
77
77
 
78
78
  h3. Policy-based Enforcement (or Collecton-level enforcement)
79
79
 
80
- If you have Policy-based enforcement enabled, then objects will inherit extra GRANT permissions from AdminPolicy objects (APOs) they are linked to with an isGovernedBy RDF relationship (stored in solr as _is_governed_by_s_ field). This allows you to grant discover/read/edit access for a whole set of objects by changing the policy they are governed by.
80
+ If you have Policy-based enforcement enabled, then objects will inherit extra GRANT permissions from AdminPolicy objects (APOs) they are linked to with an isGovernedBy RDF relationship (stored in solr as _is_governed_by_ssim_ field). This allows you to grant discover/read/edit access for a whole set of objects by changing the policy they are governed by.
81
81
 
82
82
  AdminPolicy objects store their inheritable rightsMetadata in a datastream called defaultRights. This datastream uses the regular Hydra rightsMetadata schema. Each AdminPolicy object also has its own rightsMetadata datasream, like all other Hydra assets, which specifies who is able to _edit_ the Policy or _use_ it (associate it with objects).
83
83
 
@@ -19,7 +19,7 @@ Gem::Specification.new do |gem|
19
19
  gem.required_ruby_version = '>= 1.9.3'
20
20
 
21
21
  gem.add_dependency 'activesupport'
22
- gem.add_dependency "active-fedora", '>= 6.6.0.rc1'
22
+ gem.add_dependency "active-fedora", '~> 6.6'
23
23
  gem.add_dependency 'cancan'
24
24
  gem.add_dependency 'deprecation'
25
25
  gem.add_dependency 'blacklight', '~> 4.0'
@@ -118,7 +118,7 @@ module Hydra::AccessControlsEnforcement
118
118
  end
119
119
 
120
120
  def escape_filter(key, value)
121
- [key, value.gsub(/[ \/]/, ' ' => '\ ', '/' => '\/')].join(':')
121
+ [key, value.gsub(/[ :\/]/, ' ' => '\ ', '/' => '\/', ':' => '\:')].join(':')
122
122
  end
123
123
 
124
124
  def apply_individual_permissions(permission_types)
@@ -148,6 +148,14 @@ describe Hydra::AccessControlsEnforcement do
148
148
  @solr_parameters[:fq].first.should match(/#{type}_access_group_ssim\:cd\\\/e\\ 567/)
149
149
  end
150
150
  end
151
+ it "should escape colons in the group names" do
152
+ RoleMapper.stub(:roles).with(@stub_user).and_return(["abc:123","cde:567"])
153
+ subject.send(:apply_gated_discovery, @solr_parameters, @user_parameters)
154
+ ["discover","edit","read"].each do |type|
155
+ @solr_parameters[:fq].first.should match(/#{type}_access_group_ssim\:abc\\:123/)
156
+ @solr_parameters[:fq].first.should match(/#{type}_access_group_ssim\:cde\\:567/)
157
+ end
158
+ end
151
159
  end
152
160
 
153
161
  describe "exclude_unwanted_models" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hydra-access-controls
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.4.0.rc5
4
+ version: 6.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Beer
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-10-14 00:00:00.000000000 Z
13
+ date: 2013-10-17 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport
@@ -30,16 +30,16 @@ dependencies:
30
30
  name: active-fedora
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
- - - '>='
33
+ - - ~>
34
34
  - !ruby/object:Gem::Version
35
- version: 6.6.0.rc1
35
+ version: '6.6'
36
36
  type: :runtime
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
- - - '>='
40
+ - - ~>
41
41
  - !ruby/object:Gem::Version
42
- version: 6.6.0.rc1
42
+ version: '6.6'
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: cancan
45
45
  requirement: !ruby/object:Gem::Requirement
@@ -186,9 +186,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
186
186
  version: 1.9.3
187
187
  required_rubygems_version: !ruby/object:Gem::Requirement
188
188
  requirements:
189
- - - '>'
189
+ - - '>='
190
190
  - !ruby/object:Gem::Version
191
- version: 1.3.1
191
+ version: '0'
192
192
  requirements: []
193
193
  rubyforge_project:
194
194
  rubygems_version: 2.1.7