Replace {repo_code}  with the lowercased version of your repository code (for 
example, for us, the repository code for Harvard University Archives is 'hua')
You have to do it as a hash

AppConfig[:pui_repos] = {'psa' => { :requests_permitted_for_types => 
[:archival_object]} }

Among other things, this now creates an addressable (i.e.: no undefined method 

AppConfig[:pui_repos]['psa']  that you can use for subsequent  things like 
hiding badges, e.g.:
AppConfig[:pui_repos]['psa'] ['hide'] = {:subject_badge => false, :agent_badge 
=> false}


From: archivesspace_users_group-boun...@lyralists.lyrasis.org 
[mailto:archivesspace_users_group-boun...@lyralists.lyrasis.org] On Behalf Of 
Eiszner, John W
Sent: Thursday, February 22, 2018 3:19 PM
To: archivesspace_users_group@lyralists.lyrasis.org
Subject: [Archivesspace_Users_Group] Configuration question for 2.3.0

What is the proper syntax for modifying the [:pui_repos] config statements?  
The example at 
 uses an "imaginary repository code of 'foo'", but no actual usage of "foo" is 

AppConfig[:pui_repos][{repo_code}][:requests_permitted_for_types] = 
[:archival_object] #      ...gives the syntax error "unexpected tRCURLY"

AppConfig[:pui_repos]['PSA'][:requests_permitted_for_types] = 
[:archival_object] #      ...gives the syntax error "NoMethodError: undefined 
method `[]=' for nil:NilClass"    (Note: I am not a Ruby expert.)

It appears that the string "{repo_code}" must be replaced by a local repository 
code.  We have 4 repositories in our installation:  General, GA, PSA and UA.

# Repository-specific examples.  We are using the imaginary repository code of 
'foo'.  Note the lower-case
AppConfig[:pui_repos] = {}
# Example:
# AppConfig[:pui_repos][{repo_code}] = {}
# AppConfig[:pui_repos][{repo_code}][:requests_permitted_for_types] = 
[:resource, :archival_object, :accession, :digital_object, 
:digital_object_component] # for a particular repository, only enable requests 
for certain record types (Note this configuration will override 
AppConfig[:pui_requests_permitted_for_types] for the repository)
# AppConfig[:pui_repos][{repo_code}][:requests_permitted_for_containers_only] = 
true # for a particular repository ,disable request
# AppConfig[:pui_repos][{repo_code}][:request_email] = {email address} # the 
email address to send any repository requests
# AppConfig[:pui_repos][{repo_code}][:hide] = {}
# AppConfig[:pui_repos][{repo_code}][:hide][:counts] = true

John Eiszner, Lead Analyst/Programmer
University Library
Indiana University-Purdue University Indianapolis (IUPUI)
jeisz...@iupui.edu<mailto:jeisz...@iupui.edu>  317.274.0751

Archivesspace_Users_Group mailing list

Reply via email to