hydra-access-controls 10.6.1 → 10.6.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c717d8b64aa57e3baf983b4941afe227aaeaa4d0b82908ec1580305df87bb04d
4
- data.tar.gz: 929fff58673109ed89c24d5c3fb0b4d4051d2d465ec34d7766ee9c437adcfccd
3
+ metadata.gz: 59c85b9ad05b984f2c51a16b14fea58931a6d63f9b34e2b632869b7d96f8eea5
4
+ data.tar.gz: f2b1c0daa69c0afee47b4065eaff8507326cadfbce996ad338554760a827015c
5
5
  SHA512:
6
- metadata.gz: f869c751327ced2026ddce996719d2f77a909da1e782c7d70cb79f3ffa2125a90cb12342a361360f2c448b56135fc949b13f32eb78c3e83f8b78cfd312dce62a
7
- data.tar.gz: 073c4713f9b97aa30900ec4209ea73817491e675884835724d8e8861fd8ba131a792c52040fc8dee8ca1ba315db1705cda21afee2ffebb720813a50af302a036
6
+ metadata.gz: '018366d44ecf5c886e36da31dd5a61ebb7c38b2156ecf2f60c59b0c767fb206b56b4b7fae547538d75fdb16748df4718b8f657ddd01389c489cd05d821216c6f'
7
+ data.tar.gz: d61093876bcebebb316f74aa0bebe9eee6d9349c017c45ea9c61a4a4b02ffde9578a12404973a4299d5e4b6d618e210fa2356574bd2306e71e1917f0c21205cc
@@ -14,7 +14,7 @@ module Hydra
14
14
  # (assumes that when lease visibility is applied to assets
15
15
  # whose leases have expired, the lease expiration date will be removed from its metadata)
16
16
  def assets_under_embargo
17
- ActiveFedora::Base.where("#{Hydra.config.permissions.embargo.release_date}:*")
17
+ ActiveFedora::Base.where("#{Hydra.config.permissions.embargo.release_date}:[* TO *]")
18
18
  end
19
19
 
20
20
  # Returns all assets that have had embargoes deactivated in the past.
@@ -10,7 +10,7 @@ module Hydra
10
10
  # (assumes that when lease visibility is applied to assets
11
11
  # whose leases have expired, the lease expiration date will be removed from its metadata)
12
12
  def assets_under_lease
13
- ActiveFedora::Base.where("#{Hydra.config.permissions.lease.expiration_date}:*")
13
+ ActiveFedora::Base.where("#{Hydra.config.permissions.lease.expiration_date}:[* TO *]")
14
14
  end
15
15
 
16
16
  # Returns all assets that have had embargoes deactivated in the past.
@@ -20,4 +20,3 @@ module Hydra
20
20
  end
21
21
  end
22
22
  end
23
-
@@ -11,52 +11,52 @@ FactoryBot.define do
11
11
  end
12
12
 
13
13
  factory :archivist, :parent=>:user do |u|
14
- uid 'archivist1'
15
- password 'archivist1'
14
+ uid { 'archivist1' }
15
+ password { 'archivist1' }
16
16
  end
17
17
  factory :registered_user, :parent=>:user do |u|
18
- uid 'registered_user'
19
- password 'registered_user'
18
+ uid { 'registered_user' }
19
+ password { 'registered_user' }
20
20
  end
21
21
  factory :staff, :parent=>:user do |u|
22
- uid 'staff1'
23
- password 'staff1'
22
+ uid { 'staff1' }
23
+ password { 'staff1' }
24
24
  end
25
25
  factory :student, :parent=>:user do |u|
26
- uid 'student1'
27
- password 'student1'
26
+ uid { 'student1' }
27
+ password { 'student1' }
28
28
  end
29
29
  factory :joe_creator, :parent=>:user do |u|
30
- uid 'joe_creator'
31
- password 'joe_creator'
30
+ uid { 'joe_creator' }
31
+ password { 'joe_creator' }
32
32
  end
33
33
  factory :martia_morocco, :parent=>:user do |u|
34
- uid 'martia_morocco'
35
- password 'martia_morocco'
34
+ uid { 'martia_morocco' }
35
+ password { 'martia_morocco' }
36
36
  end
37
37
  factory :ira_instructor, :parent=>:user do |u|
38
- uid 'ira_instructor'
39
- password 'ira_instructor'
38
+ uid { 'ira_instructor' }
39
+ password { 'ira_instructor' }
40
40
  end
41
41
  factory :calvin_collaborator, :parent=>:user do |u|
42
- uid 'calvin_collaborator'
43
- password 'calvin_collaborator'
42
+ uid { 'calvin_collaborator' }
43
+ password { 'calvin_collaborator' }
44
44
  end
45
45
  factory :sara_student, :parent=>:user do |u|
46
- uid 'sara_student'
47
- password 'sara_student'
46
+ uid { 'sara_student' }
47
+ password { 'sara_student' }
48
48
  end
49
49
  factory :louis_librarian, :parent=>:user do |u|
50
- uid 'louis_librarian'
51
- password 'louis_librarian'
50
+ uid { 'louis_librarian' }
51
+ password { 'louis_librarian' }
52
52
  end
53
53
  factory :carol_curator, :parent=>:user do |u|
54
- uid 'carol_curator'
55
- password 'carol_curator'
54
+ uid { 'carol_curator' }
55
+ password { 'carol_curator' }
56
56
  end
57
57
  factory :alice_admin, :parent=>:user do |u|
58
- uid 'alice_admin'
59
- password 'alice_admin'
58
+ uid { 'alice_admin' }
59
+ password { 'alice_admin' }
60
60
  end
61
61
 
62
62
  #
@@ -70,23 +70,23 @@ FactoryBot.define do
70
70
  end
71
71
 
72
72
  factory :default_access_asset, :parent=>:asset do |a|
73
- permissions_attributes [{ name: "joe_creator", access: "edit", type: "person" }]
73
+ permissions_attributes { [{ name: "joe_creator", access: "edit", type: "person" }] }
74
74
  end
75
75
 
76
76
  factory :dept_access_asset, :parent=>:asset do |a|
77
- permissions_attributes [{ name: "africana-faculty", access: "read", type: "group" }, { name: "joe_creator", access: "edit", type: "person" }]
77
+ permissions_attributes { [{ name: "africana-faculty", access: "read", type: "group" }, { name: "joe_creator", access: "edit", type: "person" }] }
78
78
  end
79
79
 
80
80
  factory :group_edit_asset, :parent=>:asset do |a|
81
- permissions_attributes [{ name:"africana-faculty", access: "edit", type: "group" }, {name: "calvin_collaborator", access: "edit", type: "person"}]
81
+ permissions_attributes { [{ name:"africana-faculty", access: "edit", type: "group" }, {name: "calvin_collaborator", access: "edit", type: "person"}] }
82
82
  end
83
83
 
84
84
  factory :org_read_access_asset, :parent=>:asset do |a|
85
- permissions_attributes [{ name: "registered", access: "read", type: "group" }, { name: "joe_creator", access: "edit", type: "person" }, { name: "calvin_collaborator", access: "edit", type: "person" }]
85
+ permissions_attributes { [{ name: "registered", access: "read", type: "group" }, { name: "joe_creator", access: "edit", type: "person" }, { name: "calvin_collaborator", access: "edit", type: "person" }] }
86
86
  end
87
87
 
88
88
  factory :open_access_asset, :parent=>:asset do |a|
89
- permissions_attributes [{ name: "public", access: "read", type: "group" }, { name: "joe_creator", access: "edit", type: "person" }, { name: "calvin_collaborator", access: "edit", type: "person" }]
89
+ permissions_attributes { [{ name: "public", access: "read", type: "group" }, { name: "joe_creator", access: "edit", type: "person" }, { name: "calvin_collaborator", access: "edit", type: "person" }] }
90
90
  end
91
91
 
92
92
  end
@@ -29,7 +29,6 @@ describe Hydra::EmbargoService do
29
29
 
30
30
  describe "#assets_under_embargo" do
31
31
  it "returns all assets with embargo release date set" do
32
- result = subject.assets_under_embargo
33
32
  returned_ids = subject.assets_under_embargo.map {|a| a.id}
34
33
  expect(returned_ids).to include work_with_expired_embargo1.id, work_with_expired_embargo2.id, work_with_embargo_in_effect.id
35
34
  expect(returned_ids).to_not include work_without_embargo.id
@@ -5,7 +5,7 @@ class User
5
5
  attr_accessor :uid
6
6
 
7
7
  def initialize(params={})
8
- self.uid = params.delete(:uid) if params[:uid]
8
+ self.uid = params.delete(:uid) if params && params[:uid]
9
9
  super
10
10
  end
11
11
 
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: 10.6.1
4
+ version: 10.6.2
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: 2019-01-31 00:00:00.000000000 Z
13
+ date: 2019-03-06 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport
@@ -236,7 +236,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
236
236
  - !ruby/object:Gem::Version
237
237
  version: '0'
238
238
  requirements: []
239
- rubygems_version: 3.0.1
239
+ rubygems_version: 3.0.3
240
240
  signing_key:
241
241
  specification_version: 4
242
242
  summary: Access controls for project hydra