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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2cf41723ee6c99b09acb09d17308f10f881d5e89c564fab81901fda438565606
4
- data.tar.gz: 81c26a26394b4b6d1dc6a8dbf686d0a3ffbba7aa974bffd9b2c2ad7ba4dd0028
3
+ metadata.gz: f687f87d6220d9c5bbf05f5021c077a96b6ba2fd2672ec429d673bc2b20801e1
4
+ data.tar.gz: 87c6578805965d78de9fbb11407ddf46718f91961354e4825e05b8a3d11a1247
5
5
  SHA512:
6
- metadata.gz: fba1af2dbbf5b2f4039f819acfeb7f00b88ec7f8fafc3df6097ff08b27a6f97c921055338cacacb332820ab11260e1a32a0557711d8d01d047e4f30761fa5475
7
- data.tar.gz: a69fba46869f6e99e228f032f436af6e926d14e29d1a80e3b6ac8b88d429869f6c591b6987bda3e230cae26cd4df8fee345fec0119573b81f1895aa4d1ef6ec1
6
+ metadata.gz: 716a26ef6830209dceaa685e95ab9b2dd69706b803ac7a2ae3130344bbcfd5320105d0bc66609a6c510128c188fc0b8b3ea52a8b8fd06d3baa72d97d61152bce
7
+ data.tar.gz: 420dfcac9d4b2c589b54d9d9e8b4d77bd68efea03bb4e062626148e266201881150232f3c116a45e3e846f8e42f805e4d6275842f4a6b3df9a968f6f1a995858
@@ -1,87 +1,95 @@
1
1
  - slug: dvs
2
2
  name: Data and Visualization Services
3
3
  short_name: null
4
- url: http://library.duke.edu/data/
5
- phone: 919-660-5880
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: http://library.duke.edu
13
- phone: 919-660-5880
12
+ url: https://library.duke.edu
13
+ phone: 919-660-5870
14
14
  email: askref@duke.edu
15
- ask: http://library.duke.edu/research/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: http://library.divinity.duke.edu/
21
- phone: 919-660-3453
20
+ url: https://library.divinity.duke.edu/
21
+ phone: 919-660-3450
22
22
  email: divlib@duke.edu
23
- ask: http://library.divinity.duke.edu/ask-us
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: http://library.duke.edu/rubenstein/uarchives/
28
+ url: https://library.duke.edu/rubenstein/uarchives/
29
29
  phone: 919-660-5822
30
- email: uarchives@duke.edu
31
- ask: http://library.duke.edu/rubenstein/uarchives/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: null
36
- url: http://library.duke.edu/rubenstein/human-rights/
35
+ short_name: Human Rights Archive
36
+ url: https://library.duke.edu/rubenstein/human-rights/
37
37
  phone: 919-660-5822
38
- email: special-collections@duke.edu
39
- ask: http://library.duke.edu/rubenstein/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: http://library.duke.edu/rubenstein/history-of-medicine/
44
+ url: https://library.duke.edu/rubenstein/history-of-medicine/
45
45
  phone: 919-684-8549
46
- email: special-collections@duke.edu
47
- ask: http://library.duke.edu/rubenstein/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: http://library.duke.edu/rubenstein/franklin/
52
+ url: https://library.duke.edu/rubenstein/franklin/
53
53
  phone: 919-660-5922
54
- email: franklin-collection@duke.edu
55
- ask: http://library.duke.edu/rubenstein/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: http://library.duke.edu/rubenstein/documentaryarts/
60
+ url: https://library.duke.edu/rubenstein/documentaryarts/
61
61
  phone: 919-660-5822
62
- email: special-collections@duke.edu
63
- ask: http://library.duke.edu/rubenstein/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: http://library.duke.edu/rubenstein/bingham/
68
+ url: https://library.duke.edu/rubenstein/bingham/
69
69
  phone: 919-660-5967
70
- email: cwhc@duke.edu
71
- ask: http://library.duke.edu/rubenstein/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: http://library.duke.edu/rubenstein/hartman/
76
+ url: https://library.duke.edu/rubenstein/hartman/
77
77
  phone: 919-660-5827
78
- email: hartman-center@duke.edu
79
- ask: http://library.duke.edu/rubenstein/hartman/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: http://library.duke.edu/rubenstein/
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: special-collections@duke.edu
87
- ask: http://library.duke.edu/rubenstein/ask
94
+ email: askrl@duke.edu
95
+ ask: https://library.duke.edu/rubenstein/ask
@@ -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
@@ -19,7 +19,7 @@ module Ddr::Auth
19
19
 
20
20
  attr_reader :auth_context
21
21
 
22
- delegate :anonymous?, :authenticated?, :metadata_manager?,
22
+ delegate :anonymous?, :authenticated?,
23
23
  :user, :groups, :agents, :member_of?,
24
24
  :authorized_to_act_as_superuser?,
25
25
  to: :auth_context
@@ -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.15.0
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-09-22 00:00:00.000000000 Z
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.22
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,9 +0,0 @@
1
- module Ddr::Auth
2
- class AdminSetAbilityDefinitions < AbilityDefinitions
3
-
4
- def call
5
- can :export, Ddr::AdminSet if metadata_manager?
6
- end
7
-
8
- end
9
- end
@@ -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