App.conf

From CollectiveAccess Documentation
Jump to: navigation, search

Frequently modified system configurations

There are several components of CollectiveAccess’s back-end default configuration that are customized frequently by users to meet the local needs of their organization. Many, although not all of these configurations, are handled in a single document called app.conf, located in the app/conf folder of the Providence directory. There are three other files that users often customize and they are described in detail below. Chances are, if there are cataloging preferences you’d like to set, you can alter the system through one of these files.

App.conf

The app.conf file is designed so that users can easy manage various system-wide settings for the back-end cataloging interface in one convenient location. This file also sets paths to other configuration files, plugins, and widgets. Several preferences in app.conf can be changed simply by flipping the value of a true/false token.

This list represents the most frequently modified preferences controlled by app.conf:

  • Session lifetime
  • Handling of duplicate and required labels and id numbers
  • Media processing
  • Suppression of record types or tables
  • Navigations and menu bar options
  • Active and strict hierarchies settings
  • Items per page defaults for results
  • Theme configurations (colors, logos, etc.)
  • Search results reporting and summary settings

Media handling options

Option Description Values Availability
dont_allow_duplicate_media If set to non-zero value object representations will be rejected if they already exist in another representation record. 0 or 1; default is 0 Providence and Pawtucket from v1.3

Image viewer options

[From v1.6]

Any zooming image viewer option may be set within the image_viewer_options list, overriding the default value. For example, the default is to include the slider but not toolbar zooming controls. To load the viewer with zooming tools in the toolbar and without the zoom slider control, include this in your app.conf:

image_viewer_options = {
   sliderZooming = false,
   toolbarZooming = true
}

ID Numbering Options

You can choose how strict your ID numbering system will be using these settings.

Option Description Values Availability
Require input id number value to conform to format If set to yes, id numbers will be required to conform to the format set in multipart_id_numbering.conf 0=no, 1=yes Providence and Pawtucket from v1.3
Allow dupe id numbers If set to no, then attempting to save records with an ID already in use by another record will fail 0=no, 1=yes Providence and Pawtucket from v1.3
Allow automated renumbering of objects in a lot Default set to no, but set to yes if If you're managing lots with related object-level records and are concerned that the lot and object numbering will get out of sync 0=no, 1=yes Providence and Pawtucket from v1.3

Preferred Label Options

Options that determine the strictness of your preferred labels.

Option Description Values Availability
Allow dupe labels If set to no, then attempting to save records with a label already in use by another record will fail 0=no, 1=yes Providence and Pawtucket from v1.3
Require preferred label If set to yes, then attempting to save records without a preferred label will fail. If set to no (default) then attempting to save a record without a preferred label will automatically set the preferred label to "[BLANK]" 0=no, 1=yes Providence and Pawtucket from v1.3

Relationship Options

Options that determine the strictness of your relationships.

Option Description Values Availability
allow_duplicate_relationships If set to no, then attempting to save records with two of the same relationship will fail 0=no, 1=yes Providence and Pawtucket from v1.5

Summary Default Option

If you plan to work heavily with Summary displays, then you can choose to have existing records open directly to that screen. New records will still open on Basic Info (or whatever you choose to name your primary editing tab).

Option Description Values Availability
Default to Summary when opening an item for editing? If set to yes, then any existing record will automatically open to its Summary screen 0=no, 1=yes Providence from v1.3

Timecode Output

You can control how time codes are displayed when saved.

Option Description Values Availability
Timecode output format set to one of three valid settings to enforce a standard colon_delimited, hours_minutes_seconds, raw Providence from v1.3

Editor Disable Switches

If you're not using certain editors in your system (you don't catalogue Places, or Movements, for example) you can disable the menu items for them by setting the various disable directives below to a non-zero value:

Table Values
ca_objects_disable 0=no, 1=yes
ca_entities_disable 0=no, 1=yes
ca_places_disable 0=no, 1=yes
ca_occurrences_disable 0=no, 1=yes
ca_collections_disable 0=no, 1=yes
ca_object_lots_disable 0=no, 1=yes
ca_storage_locations_disable 0=no, 1=yes
ca_loans_disable 0=no, 1=yes
ca_movements_disable 0=no, 1=yes
ca_tours_disable 0=no, 1=yes
ca_object_representations_disable 0=no, 1=yes

Optional features

Option Description Values Availability
enable_user_generated_content If set to non-zero value user generated content management features will be available. 0 or 1; default is 0 Providence from v1.3
email_user_when_account_activated If set to non-zero value user will be notified via email when their account is activated. This is intended to be used in conjunction with the Pawtucket app.conf setting dont_approve_logins_on_registration. 0 or 1; default is 0 Providence from v1.5

Alternate destinations for data exports

(Available for v1.5) The Data_Exporter the data exporter user interface controls support alternate destinations as of Providence v1.5. At the moment the only type of destination supported is GitHub but that can potentially be expanded. The configuration for this feature is in the setting exporter_alternate_destinations app.conf. It takes a list of destination configurations. Once you have a destination set up, it should show up in the export configuration screen that is displayed after you requested an export download. Here is a working example with one GitHub target:

exporter_alternate_destinations = {
	my_github_repo = {
		type = github,
		display = GitHub repository,
		# user credentials
		username = your_github_username,
		token = enter_access_token_here,
		# repository information
		owner = enter_repository_owner,
		repository = collectiveaccess_export,
		base_dir = exports/from_ca,
		branch = master,
		update_existing = 1
	},
}

The destination key (my_github_repo in the above example) should be unique across all configurations. The available settings inside a configuration are:

Setting name Available for type Description Example value
type Exporter destination type. Always 'github' for now. github
display UI display name for the destination My GitHub repository
username github Your GitHub username. This should be the username you use to log in. my_username
access_token github Access token for your GitHub account. Can be either your GitHub account password (not recommended) or a personal access token generated by GitHub for external application access. You can create a token in the GitHub account settings under "Applications">"Personal Access Tokens". The token has to have 'repo' access. -
owner github The owner of the repository you want to commit your exports to. Can be the same as username, but can also be different. my_username
repository github Name of the repository you want to commit to. The repository must exist under the 'owner' account. my_repository
base_dir github If you want CollectiveAccess to upload the exports to a subdirectory of the repository, set the relative path here. Should not contain a trailing slash or you might see failed uploads. exports/from_collectiveaccess
branch github The git branch you want to commit to. Usually 'master' but can be different. You can learn more about git branching here: Atlassian using branches git tutorial master
update_existing github Flag that tells CollectiveAccess if it should update existing files in place with the usual git mechanics or if the upload should fail if a filename already exists. 1

User registration & features (Pawtucket only)

Option Description Values Availability
registration_default_roles List of role to grant to newly registered users. List of role names or codes. Ex. [cataloguer, marketing] Pawtucket from v1.3
dont_allow_registration_and_login If set to non-zero value registration and login of users will not be available. Use this when you want a system the is open to all users. 0 or 1; default is 0 Pawtucket from v.1.1
dont_approve_logins_on_registration If set to non-zero value logins will not be activated upon registration, instead they must be manually activated in Providence 0 or 1; default is 0 Pawtucket from v.2.0
email_notification_for_new_registrations If set to non-zero value configured admin email will be contacted upon new Pawtucket registrations 0 or 1; default is 0 Pawtucket from v.2.0
dont_moderate_comments If set to non-zero comments will immediately be published on site 0 or 1; default is 0 Pawtucket from v.1.4
disable_my_collections If set to non-zero lightbox feature will be disabled sitewide 0 or 1; default is 0 Pawtucket from v.1.4
user_set_type set code to assign to user generated lightbox sets Default 'user' Pawtucket from v.1.4
pawtucket_requires_login If set to non-zero users must be logged in to access site 0 or 1; default is 0 Pawtucket from v.1.4

Printed Label Output

You can control how printed labels are displayed using the following directives:

Option Description Values Availability
add_print_label_borders Set to a non-zero value to force all printed labels to have visible borders. This can be useful when testing layouts. 0,1 Providence from v1.5

Locale

[From v1.7]

User interface locale preferences may be limited using the following directives:

Option Description Values Availability
restrict_to_ui_locales Limit user interface locale preference choices to the specified locales. If not set then all installed locales are available. Any available locale code (locales are stored in the app/locales directory). Ex. [en_US, es_ES] will limit UI locale choices to US english and Spanish Providence from v1.7

Bundle displays

[From v1.7]

The behavior of displays may be modified using the following directives:

Option Description Values Availability
<table name>_default_bundle_display_template Display template to use for ca_entities bundle when a template is not explicitly set for the bundle within the display. <table name> is a valid related table (Eg. ca_entities, ca_objects, ca_occurrences, etc.) Providence from v1.7
Namespaces

Variants
Actions
Navigation
Tools
User
Personal tools