dor-services 4.8.0 → 4.8.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  module Dor
2
2
  class RoleMetadataDS < ActiveFedora::OmDatastream
3
3
  include SolrDocHelper
4
-
4
+
5
5
  set_terminology do |t|
6
6
  t.root :path => 'roleMetadata'
7
7
 
@@ -19,20 +19,20 @@ class RoleMetadataDS < ActiveFedora::OmDatastream
19
19
  t.person :ref => [:person]
20
20
  t.group :ref => [:group]
21
21
  end
22
-
22
+
23
23
  t.manager :ref => [:role], :attributes => {:type => 'manager'}
24
24
  t.depositor :ref => [:role], :attributes => {:type => 'depositor'}
25
25
  t.reviewer :ref => [:role], :attributes => {:type => 'reviewer'}
26
26
  t.viewer :ref => [:role], :attributes => {:type => 'viewer'}
27
27
  end
28
-
28
+
29
29
  def self.xml_template
30
30
  Nokogiri::XML::Builder.new do |xml|
31
31
  xml.roleMetadata{
32
32
  }
33
33
  end.doc
34
34
  end
35
-
35
+
36
36
 
37
37
  def to_solr(solr_doc=Hash.new, *args)
38
38
  self.find_by_xpath('/roleMetadata/role/*').each do |actor|
@@ -40,12 +40,12 @@ class RoleMetadataDS < ActiveFedora::OmDatastream
40
40
  val = [actor.at_xpath('identifier/@type'),actor.at_xpath('identifier/text()')].join ':'
41
41
  add_solr_value(solr_doc, "apo_role_#{actor.name}_#{role_type}", val, :string, [:searchable, :facetable])
42
42
  add_solr_value(solr_doc, "apo_role_#{role_type}", val, :string, [:searchable, :facetable])
43
- if ['dor-apo-manager','dor-apo-depositor'].include? role_type
43
+ unless role_type =~ /^hydrus/
44
44
  add_solr_value(solr_doc, "apo_register_permissions", val, :string, [:searchable, :facetable])
45
45
  end
46
46
  end
47
47
  solr_doc
48
48
  end
49
-
49
+
50
50
  end
51
51
  end
data/lib/dor/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Dor
2
- VERSION = '4.8.0'
2
+ VERSION = '4.8.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dor-services
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.8.0
4
+ version: 4.8.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2014-06-17 00:00:00.000000000 Z
16
+ date: 2014-06-18 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: active-fedora