hydra-access-controls 5.0.0.pre1 → 5.0.0.pre2
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/lib/hydra/access_controls_enforcement.rb +1 -1
- data/spec/support/rails.rb +4 -1
- data/spec/unit/ability_spec.rb +0 -3
- data/spec/unit/access_controls_enforcement_spec.rb +0 -5
- data/spec/unit/policy_aware_ability_spec.rb +1 -5
- data/spec/unit/policy_aware_access_controls_enforcement_spec.rb +0 -5
- data/spec/unit/role_mapper_spec.rb +0 -7
- metadata +2 -2
@@ -167,7 +167,7 @@ module Hydra::AccessControlsEnforcement
|
|
167
167
|
#
|
168
168
|
# @example This method should be added to your Catalog Controller's solr_search_params_logic
|
169
169
|
# class CatalogController < ApplicationController
|
170
|
-
# include Hydra::
|
170
|
+
# include Hydra::Controller::ControllerBehavior
|
171
171
|
# CatalogController.solr_search_params_logic << :add_access_controls_to_solr_params
|
172
172
|
# end
|
173
173
|
def add_access_controls_to_solr_params(solr_parameters, user_parameters)
|
data/spec/support/rails.rb
CHANGED
data/spec/unit/ability_spec.rb
CHANGED
@@ -2,11 +2,6 @@ require 'spec_helper'
|
|
2
2
|
# Need way to find way to stub current_user and RoleMapper in order to run these tests
|
3
3
|
|
4
4
|
describe Hydra::AccessControlsEnforcement do
|
5
|
-
before do
|
6
|
-
class Rails; end
|
7
|
-
Rails.stub(:root).and_return('spec/support')
|
8
|
-
Rails.stub(:env).and_return('test')
|
9
|
-
end
|
10
5
|
before(:all) do
|
11
6
|
class MockController
|
12
7
|
include Hydra::AccessControlsEnforcement
|
@@ -2,10 +2,6 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe Hydra::PolicyAwareAbility do
|
4
4
|
before do
|
5
|
-
class Rails; end
|
6
|
-
Rails.stub(:root).and_return('spec/support')
|
7
|
-
Rails.stub(:env).and_return('test')
|
8
|
-
|
9
5
|
Hydra.stub(:config).and_return({
|
10
6
|
:permissions=>{
|
11
7
|
:catchall => "access_t",
|
@@ -89,4 +85,4 @@ describe Hydra::PolicyAwareAbility do
|
|
89
85
|
subject.read_persons_from_policy(@policy.pid).should == ["julius_caesar","nero"]
|
90
86
|
end
|
91
87
|
end
|
92
|
-
end
|
88
|
+
end
|
@@ -1,11 +1,6 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe Hydra::PolicyAwareAccessControlsEnforcement do
|
4
|
-
before do
|
5
|
-
class Rails; end
|
6
|
-
Rails.stub(:root).and_return('spec/support')
|
7
|
-
Rails.stub(:env).and_return('test')
|
8
|
-
end
|
9
4
|
before(:all) do
|
10
5
|
class MockController
|
11
6
|
include Hydra::AccessControlsEnforcement
|
@@ -1,13 +1,6 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe RoleMapper do
|
4
|
-
before do
|
5
|
-
class Rails; end
|
6
|
-
|
7
|
-
Rails.stub(:root).and_return('spec/support')
|
8
|
-
Rails.stub(:env).and_return('test')
|
9
|
-
end
|
10
|
-
|
11
4
|
it "should define the 4 roles" do
|
12
5
|
RoleMapper.role_names.sort.should == %w(admin_policy_object_editor archivist donor patron researcher)
|
13
6
|
end
|
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: 5.0.0.
|
4
|
+
version: 5.0.0.pre2
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2012-
|
14
|
+
date: 2012-10-05 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: activesupport
|