cul_hydra 1.7.4 → 1.7.5

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: 29387b752b0fb6cead460295cf65e9ca9b192ab177cad64fd2c8fe78ff300f28
4
- data.tar.gz: 89e019905a985e368e7c62bc1f586802f4f32ac94d9f2ff3f7b3cadc3af7fa7d
3
+ metadata.gz: a7961ef5a63d3b960c8197ca7e47700b8cd41d9e4a74d2ce78265b040f0d0919
4
+ data.tar.gz: 9baeeb5503f065119b5c90f58ef8995ed6b4b09c0c3c452b7b54a5b057cb2567
5
5
  SHA512:
6
- metadata.gz: 1fe32857825ab0d7a3787ebe6e3f9904a5e12991afd8a3473461cf82a596d3998d6dbfc616d9f4b62b42fbefd8737ccad7d8a7f804595776fb185fcb9b1c7402
7
- data.tar.gz: b296fb7e7e7bd9d575c18bd59d07da1693eb4f134833f24e4de39e3c90e3d86dc13c1e13c895e685322e52113f9de2b6237e1003b7522da7a8358619a42c6d7f
6
+ metadata.gz: d88d7fa652311e8b9cb33305f75f4f396fdfd5499635ca54449d983147ec694dbee9ced4707000cb9d3a077dfd4115e8f828d46d6598f03237bb38c4987ea1d5
7
+ data.tar.gz: 556b434b37604bf3e893d70aabdd733d029e9c3c024476e96acb8f30c584878e9b53ffcb5952c31a53653eff570e207b59e924c40a529f9b70abf4190a7901dc
@@ -145,6 +145,16 @@ class GenericResource < ::ActiveFedora::Base
145
145
  end
146
146
  end
147
147
 
148
+ def closed?
149
+ return access_levels.map(&:downcase).include?('closed')
150
+ end
151
+
152
+ def access_levels
153
+ acm = datastreams['accessControlMetadata']
154
+ return [] if acm.content.blank?
155
+ return acm.to_solr.fetch('access_control_levels_ssim', [])
156
+ end
157
+
148
158
  def service_datastream
149
159
  # we have to 'manually' query the graph because rels_int doesn't support subject pattern matching
150
160
  args = [:s, rels_int.to_predicate(:format_of), RDF::URI.new("#{internal_uri}/content")]
@@ -1,6 +1,6 @@
1
1
  module Cul
2
2
  module Hydra
3
- VERSION = '1.7.4'
3
+ VERSION = '1.7.5'
4
4
  def self.version
5
5
  VERSION
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cul_hydra
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.4
4
+ version: 1.7.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Benjamin Armintor
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-07-03 00:00:00.000000000 Z
12
+ date: 2019-07-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bootstrap-sass