Skip to content

An ArchivesSpace plugin to add Custom Restrictions and additional Context

Notifications You must be signed in to change notification settings

dartmouth-dltg/aspace_custom_restrictions_and_context

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WIP: Custom Restrictions and Context

About

An ArchivesSpace plugin that enhances the staff and public interfaces with custom restrictions and additional contextual information.

Installation

Install as you normally would and add aspace_custom_restrictions_and_context to your list of enabled plugins in AppConfig[:plugins].

Run the setup-database script before using since the plugin needs to update the database.

The plugin does not have any additional dependencies so you do not need to run the initialize-plugin script.

Configuration

The plugin accepts several configuration options.

Disable the context and and location display on resources and archival objects. Set

AppConfig[:aspace_custom_restrictions_show_context] = false

Disable the restrictions on Staff search results. Set

AppConfig[:aspace_custom_restrictions_sui_search_enhance] = false

Disable the display of restrictions in the PUI. Set

AppConfig[:aspace_custom_restrictions_pui_enhance] = false

To limit the of display certain restrictions to specific object types, use a configuration options like

AppConfig[:aspace_custom_restriction_type_mapping] = {
  'some_materials_restricted' => [
    'otherlevel',
    'box', # this is a potential otherlevel type
    'collection',
    'series',
    'subseries'
  ]
}

Note that the key(s) must correspond to the restriction types set in the Custom Restriction Type enumeration. The array list should consist of the levels or (in the case of accessions, digital objects, and digital object components) the jsonmodel_type (e.g. digital_object). If you use otherlevel, include the otherlevel types you use. The default is to apply all restriction types to all relevant objects (see below).

If you have Conditions Governing Access notes and have noted that a object is open, you can direct the restrictions plugin to skip/ignore certain phrases. For example, if you had added notes that state open for access, you can add that to the aspace_custom_restrictions_access_note_skip_phrases configuration option.

AppConfig[:aspace_custom_restrictions_access_note_skip_phrases] = [
  'open for access'
]

You can have multiple skip phrases in the configuration option.

You can also completely turn off the use of Conditions Governing Access notes in the restriction calculation.

AppConfig[:aspace_custom_restrictions_use_accessrestrict] = false

Enhancements

Staff Interface

The plugin adds a custom restriction sub-record to

  1. accessions
  2. resources
  3. archival objects
  4. digital objects
  5. digital object components

which allows an editor to tag an object with more nuance than just the stock Restrictions Apply? checkbox. However, if that checkbox had been ticked, the plugin will also use that data.

The plugin parses the custom restriction data, any Conditions Governing Access notes, and the Restrictions Apply? data and displays a warning on the object that the restriction has been applied. It also displays the restriction text on all of its descendants. The language displayed depends on the custom restriction selected or provides a default. See frontend/locales/enums for values supplied by the plugin. This is displayed for both view mode for an object and in search & browse results.

Note that the precedence order for restrictions is

  1. Custom restriction
  2. Conditions Governing Access note
  3. Restrictions Apply? checkbox

The plugin also displays the context (the hierarchical tree) for archival objects and/or the location of the archival object, resource, or accession if a container instance is attached. The context and location are both displayed on the view mode of an archival object, while the location is only displayed in search results. Digital object components will also be enhanced with an additional context tree in view mode.

PUI

The plugin adds a restriction note to the search & browse results and the object view similarly to the way it enhances the staff interface.

Enumerations

The plugin adds a new editable enumeration - Custom Restriction Type. If you add additional values to this list, make sure that you also add translations in frontend/locales/enums.

Note

In order to make this plugin useful for multiple versions of ArchivesSpace and to limit maintenance of multiple versions, the plugin uses javascript to enhance the layouts and makes one additional request per object. For views of a single object this is one additional request, but for search results this will increase the number of requests by the default page size. Depending on the resources available to your ArchivesSpace instance, you may notice some performance impacts.

Credits

Plugin developed by Joshua Shaw [[email protected]], Digital Library Technologies Group Dartmouth Library, Dartmouth College

About

An ArchivesSpace plugin to add Custom Restrictions and additional Context

Resources

Stars

Watchers

Forks

Packages

No packages published