ddr-core 1.15.0 → 1.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/aux/contact.yml +41 -33
- data/lib/ddr/auth/ability.rb +0 -2
- data/lib/ddr/auth/abstract_ability.rb +1 -1
- data/lib/ddr/auth/auth_context.rb +0 -4
- data/lib/ddr/auth.rb +0 -8
- metadata +3 -5
- data/lib/ddr/auth/ability_definitions/admin_set_ability_definitions.rb +0 -9
- data/lib/ddr/auth/ability_definitions/collection_ability_definitions.rb +0 -28
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f687f87d6220d9c5bbf05f5021c077a96b6ba2fd2672ec429d673bc2b20801e1
|
4
|
+
data.tar.gz: 87c6578805965d78de9fbb11407ddf46718f91961354e4825e05b8a3d11a1247
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 716a26ef6830209dceaa685e95ab9b2dd69706b803ac7a2ae3130344bbcfd5320105d0bc66609a6c510128c188fc0b8b3ea52a8b8fd06d3baa72d97d61152bce
|
7
|
+
data.tar.gz: 420dfcac9d4b2c589b54d9d9e8b4d77bd68efea03bb4e062626148e266201881150232f3c116a45e3e846f8e42f805e4d6275842f4a6b3df9a968f6f1a995858
|
data/config/aux/contact.yml
CHANGED
@@ -1,87 +1,95 @@
|
|
1
1
|
- slug: dvs
|
2
2
|
name: Data and Visualization Services
|
3
3
|
short_name: null
|
4
|
-
url:
|
5
|
-
phone: 919-660-
|
4
|
+
url: https://library.duke.edu/data/
|
5
|
+
phone: 919-660-5870
|
6
6
|
email: askdata@duke.edu
|
7
7
|
ask: null
|
8
8
|
|
9
9
|
- slug: libraries
|
10
10
|
name: Duke University Libraries
|
11
11
|
short_name: null
|
12
|
-
url:
|
13
|
-
phone: 919-660-
|
12
|
+
url: https://library.duke.edu
|
13
|
+
phone: 919-660-5870
|
14
14
|
email: askref@duke.edu
|
15
|
-
ask:
|
15
|
+
ask: https://library.duke.edu/research/ask
|
16
16
|
|
17
17
|
- slug: divinity
|
18
18
|
name: Divinity School Library
|
19
19
|
short_name: null
|
20
|
-
url:
|
21
|
-
phone: 919-660-
|
20
|
+
url: https://library.divinity.duke.edu/
|
21
|
+
phone: 919-660-3450
|
22
22
|
email: divlib@duke.edu
|
23
|
-
ask:
|
23
|
+
ask: https://library.divinity.duke.edu/ask-us
|
24
24
|
|
25
25
|
- slug: uarchives
|
26
26
|
name: Duke University Archives
|
27
27
|
short_name: University Archives
|
28
|
-
url:
|
28
|
+
url: https://library.duke.edu/rubenstein/uarchives/
|
29
29
|
phone: 919-660-5822
|
30
|
-
email:
|
31
|
-
ask:
|
30
|
+
email: askrl@duke.edu
|
31
|
+
ask: https://library.duke.edu/rubenstein/ask
|
32
32
|
|
33
33
|
- slug: humanrights
|
34
34
|
name: Human Rights Archive
|
35
|
-
short_name:
|
36
|
-
url:
|
35
|
+
short_name: Human Rights Archive
|
36
|
+
url: https://library.duke.edu/rubenstein/human-rights/
|
37
37
|
phone: 919-660-5822
|
38
|
-
email:
|
39
|
-
ask:
|
38
|
+
email: askrl@duke.edu
|
39
|
+
ask: https://library.duke.edu/rubenstein/ask
|
40
40
|
|
41
41
|
- slug: hom
|
42
42
|
name: History of Medicine Collections
|
43
43
|
short_name: null
|
44
|
-
url:
|
44
|
+
url: https://library.duke.edu/rubenstein/history-of-medicine/
|
45
45
|
phone: 919-684-8549
|
46
|
-
email:
|
47
|
-
ask:
|
46
|
+
email: askrl@duke.edu
|
47
|
+
ask: https://library.duke.edu/rubenstein/ask
|
48
48
|
|
49
49
|
- slug: franklin
|
50
50
|
name: John Hope Franklin Research Center
|
51
51
|
short_name: Franklin Research Center
|
52
|
-
url:
|
52
|
+
url: https://library.duke.edu/rubenstein/franklin/
|
53
53
|
phone: 919-660-5922
|
54
|
-
email:
|
55
|
-
ask:
|
54
|
+
email: askrl@duke.edu
|
55
|
+
ask: https://library.duke.edu/rubenstein/ask
|
56
56
|
|
57
57
|
- slug: docarts
|
58
58
|
name: Archive of Documentary Arts
|
59
59
|
short_name: null
|
60
|
-
url:
|
60
|
+
url: https://library.duke.edu/rubenstein/documentaryarts/
|
61
61
|
phone: 919-660-5822
|
62
|
-
email:
|
63
|
-
ask:
|
62
|
+
email: askrl@duke.edu
|
63
|
+
ask: https://library.duke.edu/rubenstein/ask
|
64
64
|
|
65
65
|
- slug: bingham
|
66
66
|
name: Sallie Bingham Center for Women's History & Culture
|
67
67
|
short_name: Bingham Center
|
68
|
-
url:
|
68
|
+
url: https://library.duke.edu/rubenstein/bingham/
|
69
69
|
phone: 919-660-5967
|
70
|
-
email:
|
71
|
-
ask:
|
70
|
+
email: askrl@duke.edu
|
71
|
+
ask: https://library.duke.edu/rubenstein/ask
|
72
72
|
|
73
73
|
- slug: hartman
|
74
74
|
name: John W. Hartman Center for Sales, Advertising & Marketing History
|
75
75
|
short_name: Hartman Center
|
76
|
-
url:
|
76
|
+
url: https://library.duke.edu/rubenstein/hartman/
|
77
77
|
phone: 919-660-5827
|
78
|
-
email:
|
79
|
-
ask:
|
78
|
+
email: askrl@duke.edu
|
79
|
+
ask: https://library.duke.edu/rubenstein/ask
|
80
80
|
|
81
81
|
- slug: rubenstein
|
82
82
|
name: David M. Rubenstein Rare Book & Manuscript Library
|
83
83
|
short_name: Rubenstein Library
|
84
|
-
url:
|
84
|
+
url: https://library.duke.edu/rubenstein/
|
85
|
+
phone: 919-660-5822
|
86
|
+
email: askrl@duke.edu
|
87
|
+
ask: https://library.duke.edu/rubenstein/ask
|
88
|
+
|
89
|
+
- slug: economists
|
90
|
+
name: Economists' Papers Archive
|
91
|
+
short_name: null
|
92
|
+
url: https://library.duke.edu/rubenstein/economists
|
85
93
|
phone: 919-660-5822
|
86
|
-
email:
|
87
|
-
ask:
|
94
|
+
email: askrl@duke.edu
|
95
|
+
ask: https://library.duke.edu/rubenstein/ask
|
data/lib/ddr/auth/ability.rb
CHANGED
@@ -3,7 +3,6 @@ module Ddr
|
|
3
3
|
class Ability < AbstractAbility
|
4
4
|
|
5
5
|
self.ability_definitions = [ AliasAbilityDefinitions,
|
6
|
-
CollectionAbilityDefinitions,
|
7
6
|
ItemAbilityDefinitions,
|
8
7
|
ComponentAbilityDefinitions,
|
9
8
|
AttachmentAbilityDefinitions,
|
@@ -11,7 +10,6 @@ module Ddr
|
|
11
10
|
EmbargoAbilityDefinitions,
|
12
11
|
PublicationAbilityDefinitions,
|
13
12
|
LockAbilityDefinitions,
|
14
|
-
AdminSetAbilityDefinitions,
|
15
13
|
]
|
16
14
|
|
17
15
|
end
|
@@ -41,10 +41,6 @@ module Ddr::Auth
|
|
41
41
|
env && env.key?("warden") && env["warden"].authenticate?(scope: :superuser)
|
42
42
|
end
|
43
43
|
|
44
|
-
def metadata_manager?
|
45
|
-
member_of? Ddr::Auth.metadata_managers_group
|
46
|
-
end
|
47
|
-
|
48
44
|
# Return the user agent for this context.
|
49
45
|
# @return [String] or nil, if auth context is anonymous/
|
50
46
|
def agent
|
data/lib/ddr/auth.rb
CHANGED
@@ -29,10 +29,8 @@ module Ddr
|
|
29
29
|
autoload :WebAuthContext
|
30
30
|
|
31
31
|
autoload_under 'ability_definitions' do
|
32
|
-
autoload :AdminSetAbilityDefinitions
|
33
32
|
autoload :AliasAbilityDefinitions
|
34
33
|
autoload :AttachmentAbilityDefinitions
|
35
|
-
autoload :CollectionAbilityDefinitions
|
36
34
|
autoload :ComponentAbilityDefinitions
|
37
35
|
autoload :ItemAbilityDefinitions
|
38
36
|
autoload :EmbargoAbilityDefinitions
|
@@ -45,12 +43,6 @@ module Ddr
|
|
45
43
|
# Name of group whose members are authorized to act as superuser
|
46
44
|
mattr_accessor :superuser_group
|
47
45
|
|
48
|
-
# Name of group whose members are authorized to create Collections
|
49
|
-
mattr_accessor :collection_creators_group
|
50
|
-
|
51
|
-
# Name of group whose members are authorized to act as a metadata manager
|
52
|
-
mattr_accessor :metadata_managers_group
|
53
|
-
|
54
46
|
# Whether to require Shibboleth authentication
|
55
47
|
mattr_accessor :require_shib_user_authn do
|
56
48
|
false
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ddr-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.17.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jim Coble
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2022-
|
14
|
+
date: 2022-12-12 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: activeresource
|
@@ -352,10 +352,8 @@ files:
|
|
352
352
|
- lib/ddr/auth.rb
|
353
353
|
- lib/ddr/auth/ability.rb
|
354
354
|
- lib/ddr/auth/ability_definitions.rb
|
355
|
-
- lib/ddr/auth/ability_definitions/admin_set_ability_definitions.rb
|
356
355
|
- lib/ddr/auth/ability_definitions/alias_ability_definitions.rb
|
357
356
|
- lib/ddr/auth/ability_definitions/attachment_ability_definitions.rb
|
358
|
-
- lib/ddr/auth/ability_definitions/collection_ability_definitions.rb
|
359
357
|
- lib/ddr/auth/ability_definitions/component_ability_definitions.rb
|
360
358
|
- lib/ddr/auth/ability_definitions/embargo_ability_definitions.rb
|
361
359
|
- lib/ddr/auth/ability_definitions/item_ability_definitions.rb
|
@@ -450,7 +448,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
450
448
|
- !ruby/object:Gem::Version
|
451
449
|
version: '0'
|
452
450
|
requirements: []
|
453
|
-
rubygems_version: 3.3.
|
451
|
+
rubygems_version: 3.0.3.1
|
454
452
|
signing_key:
|
455
453
|
specification_version: 4
|
456
454
|
summary: Models used in the Duke Digital Repository
|
@@ -1,28 +0,0 @@
|
|
1
|
-
module Ddr
|
2
|
-
module Auth
|
3
|
-
class CollectionAbilityDefinitions < AbilityDefinitions
|
4
|
-
|
5
|
-
def call
|
6
|
-
if member_of? Ddr::Auth.collection_creators_group
|
7
|
-
can :create, Ddr::Collection
|
8
|
-
end
|
9
|
-
can :export, Ddr::Collection do |obj|
|
10
|
-
has_policy_permission?(obj, Permissions::READ)
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
private
|
15
|
-
|
16
|
-
def policy_permissions(obj)
|
17
|
-
obj.policy_roles
|
18
|
-
.select { |r| agents.include?(r.agent) }
|
19
|
-
.map(&:permissions).flatten.uniq
|
20
|
-
end
|
21
|
-
|
22
|
-
def has_policy_permission?(obj, perm)
|
23
|
-
policy_permissions(obj).include?(perm)
|
24
|
-
end
|
25
|
-
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|