hydra-access-controls 5.0.0.rc1 → 5.0.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.
data/Rakefile
CHANGED
@@ -5,8 +5,7 @@ require 'rspec/core/rake_task'
|
|
5
5
|
APP_ROOT= File.expand_path(File.join(File.dirname(__FILE__),".."))
|
6
6
|
require 'jettywrapper'
|
7
7
|
# re-using hydra_jetty.rake from hydra-head
|
8
|
-
|
9
|
-
import "lib/tasks/hydra-access-controls.rake"
|
8
|
+
import "tasks/hydra-access-controls.rake"
|
10
9
|
|
11
10
|
desc 'Default: run specs.'
|
12
11
|
task :default => :spec
|
@@ -5,6 +5,7 @@ module Hydra::AccessControlsEnforcement
|
|
5
5
|
|
6
6
|
included do
|
7
7
|
include Hydra::AccessControlsEvaluation
|
8
|
+
include Blacklight::SolrHelper # for force_to_utf8
|
8
9
|
class_attribute :solr_access_filters_logic
|
9
10
|
|
10
11
|
# Set defaults. Each symbol identifies a _method_ that must be in
|
@@ -154,7 +155,7 @@ module Hydra::AccessControlsEnforcement
|
|
154
155
|
raise Hydra::AccessDenied.new "You do not have sufficient privileges to create a new document."
|
155
156
|
end
|
156
157
|
end
|
157
|
-
deprecation_deprecate :
|
158
|
+
deprecation_deprecate :enforce_create_permissions
|
158
159
|
|
159
160
|
## proxies to enforce_edit_permssions. This method is here for you to override
|
160
161
|
def enforce_update_permissions(opts={})
|
@@ -175,7 +176,7 @@ module Hydra::AccessControlsEnforcement
|
|
175
176
|
# Currently does nothing, instead relies on
|
176
177
|
# @param [Hash] opts (optional, not currently used)
|
177
178
|
def enforce_index_permissions(opts={})
|
178
|
-
# Do nothing. Relies on
|
179
|
+
# Do nothing. Relies on add_access_controls_to_solr_params being in the Controller's solr_search_params_logic
|
179
180
|
return true
|
180
181
|
end
|
181
182
|
|
File without changes
|
metadata
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hydra-access-controls
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.0
|
5
|
-
prerelease:
|
4
|
+
version: 5.0.0
|
5
|
+
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Chris Beer
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2012-12-
|
14
|
+
date: 2012-12-11 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: activesupport
|
@@ -152,8 +152,6 @@ files:
|
|
152
152
|
- lib/hydra/policy_aware_access_controls_enforcement.rb
|
153
153
|
- lib/hydra/role_mapper_behavior.rb
|
154
154
|
- lib/hydra/user.rb
|
155
|
-
- lib/tasks/hydra-access-controls.rake
|
156
|
-
- lib/tasks/hydra_jetty.rake
|
157
155
|
- spec/factories.rb
|
158
156
|
- spec/spec_helper.rb
|
159
157
|
- spec/support/blacklight.rb
|
@@ -172,6 +170,7 @@ files:
|
|
172
170
|
- spec/unit/policy_aware_access_controls_enforcement_spec.rb
|
173
171
|
- spec/unit/rights_metadata_spec.rb
|
174
172
|
- spec/unit/role_mapper_spec.rb
|
173
|
+
- tasks/hydra-access-controls.rake
|
175
174
|
homepage: http://projecthydra.org
|
176
175
|
licenses: []
|
177
176
|
post_install_message:
|
@@ -187,9 +186,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
187
186
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
188
187
|
none: false
|
189
188
|
requirements:
|
190
|
-
- - ! '
|
189
|
+
- - ! '>='
|
191
190
|
- !ruby/object:Gem::Version
|
192
|
-
version:
|
191
|
+
version: '0'
|
193
192
|
requirements: []
|
194
193
|
rubyforge_project:
|
195
194
|
rubygems_version: 1.8.24
|
data/lib/tasks/hydra_jetty.rake
DELETED
@@ -1,55 +0,0 @@
|
|
1
|
-
# re-using hydra_jetty.rake from hydra-head
|
2
|
-
|
3
|
-
namespace :jetty do
|
4
|
-
desc "Apply all configs to Testing Server (relies on hydra:jetty:config tasks unless you override it)"
|
5
|
-
task :config do
|
6
|
-
Rake::Task["hydra:jetty:config"].invoke
|
7
|
-
end
|
8
|
-
end
|
9
|
-
|
10
|
-
namespace :hydra do
|
11
|
-
namespace :jetty do
|
12
|
-
desc "Copies the default Solr & Fedora configs into the bundled Hydra Testing Server"
|
13
|
-
task :config do
|
14
|
-
Rake::Task["hydra:jetty:config_fedora"].invoke
|
15
|
-
Rake::Task["hydra:jetty:config_solr"].invoke
|
16
|
-
end
|
17
|
-
|
18
|
-
desc "Copies the contents of solr_conf into the Solr development-core and test-core of Testing Server"
|
19
|
-
task :config_solr do
|
20
|
-
FileList['solr_conf/conf/*'].each do |f|
|
21
|
-
cp("#{f}", 'jetty/solr/development-core/conf/', :verbose => true)
|
22
|
-
cp("#{f}", 'jetty/solr/test-core/conf/', :verbose => true)
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
desc "Copies a custom fedora config for the bundled Hydra Testing Server"
|
27
|
-
task :config_fedora do
|
28
|
-
# load a custom fedora.fcfg -
|
29
|
-
if defined?(Rails.root)
|
30
|
-
app_root = Rails.root
|
31
|
-
else
|
32
|
-
app_root = File.join(File.dirname(__FILE__),"..")
|
33
|
-
end
|
34
|
-
|
35
|
-
fcfg = File.join(app_root,"fedora_conf","conf","development","fedora.fcfg")
|
36
|
-
if File.exists?(fcfg)
|
37
|
-
puts "copying over development/fedora.fcfg"
|
38
|
-
cp("#{fcfg}", 'jetty/fedora/default/server/config/', :verbose => true)
|
39
|
-
else
|
40
|
-
puts "#{fcfg} file not found -- skipping fedora config"
|
41
|
-
end
|
42
|
-
fcfg = File.join(app_root,"fedora_conf","conf","test","fedora.fcfg")
|
43
|
-
if File.exists?(fcfg)
|
44
|
-
puts "copying over test/fedora.fcfg"
|
45
|
-
cp("#{fcfg}", 'jetty/fedora/test/server/config/', :verbose => true)
|
46
|
-
else
|
47
|
-
puts "#{fcfg} file not found -- skipping fedora config"
|
48
|
-
end
|
49
|
-
end
|
50
|
-
|
51
|
-
desc "Copies the default SOLR config files and starts up the fedora instance."
|
52
|
-
task :load => [:config, 'jetty:start']
|
53
|
-
|
54
|
-
end
|
55
|
-
end
|