Customising the administration interface

Customisation of the administration interface is not recommended and is unsupported. Changes may be lost during an upgrade or break future upgrades.

Background

This article describes how the classic administration interface can be customised.

Configuration files

Configuration rules for the administration UI are defined in the following files.

  • conf/admin-ui.ini.default: Global Rules

  • conf/filemanager.ini: File Manager Rules

  • admin/users/<username>.ini: User specific rules

  • share/security/: for collection param whitelists

Customising the interface

For many userid ini file settings to be active, they also require the user_type to be set to custom.

The configuration process may require some trial and error so advisable to take checkpoint copies to fallback to if necessary.

Removing items from the tabs

Have a look at /conf/admin-ui.ini.default

Modifications should take place in conf/admin-ui.ini. The .default file should not be modified as it will get overwritten during upgrades. If this file doesn’t exist it can be created by copying the .default file)

This file lists all the different options that can be set for customising the admin interface.

The tabs are defined using the code block:

[main-page::tabs]
1=Customise
2=Administer
3=Update
4=Analyse

Each tab has it’s own definition. eg. for the customise tab the default looks like:

[main-page::tabs::Customise]
1=main-page::design-results-page
2=main-page::customise-featured-pages
3=main-page::customise-query-expansions

To customise these in a particular profile, edit the user’s ini file (/admin/users/<username>.ini)

Add the relevant code block corresponding to the section that you wish to customise and edit it. eg. to remove the featured pages link

[main-page::tabs::Customise]
1=main-page::design-results-page
2=main-page::customise-query-expansions
3=

Adding an action

Add an entry to the relevant section block - this might require you to clone the section block in the user’s ini file, or edit the global (admin-ui.ini)

e.g. Let’s add an option to customise Faceted Navigation to the customise tab.

[main-page::tabs::Customise]
1=main-page::design-results-page
2=main-page::customise-featured-pages
3=main-page::customise-query-expansions
4=main-page::customise-faceted-navigation

Create a code block that defines the action - it has to match the name that you have just defined. eg. for the example above

[main-page::customise-faceted-navigation]
link=edit-conf.cgi?f=faceted_navigation.cfg
text=Customise Faceted Navigation
icon=apps/internet-news-reader.png
required_permission=sec.file.manager
invisible_on_permission_denied=0
  • link is the URL that will be rendered for the link

  • text is the link text

  • icon is the icon file to use beside the link (available icons are at $SEARCH_HOME/web/admin/images/22x22/ - and you can add custom images if you wish)

  • required_permission defines the permission that you need to be able to access the item.

  • invisible_on_permission_denied indicates if the option should be greyed out or hidden completely if the user doesn’t have permission.

Removing a tab

To remove a tab edit the tabs block

e.g. to remove the administer tab

[main-page::tabs]
1=Customise
2=Update
3=Analyse
4=

Customising the file rules for a profile folder

You can create a rules block within the user’s ini file or within the main filemanager.ini file that contains the file rules

This will depend on whether or not you want to reuse this rules definition in other profiles.

File manger access will also require:

  • the setting: sec.file.manager = yes

  • for editing: sec.file.manager.edit = yes

e.g.

[file-manager::example-rules]
# Default file-manager rules for profile directories (applied AFTER the user's own rules - in this order)
#
# glob : collection : action,action...
#
# Specific rules for standard files (change at your own risk!)
simple.form : * : delete

# Config files that can be created (see fm.create)
custom.form : * : upload,download,delete,edit,create
*.ftl : * : upload,download,delete,edit,create
best_bets.cfg : * : upload,download,delete,edit,create

# Config files that are read only
collection.cfg : * : show
metamap.cfg : * : show
external_metadata.cfg : * : show

Then point the profile folder to use those rules:

[file-manager::profile-folder-example]
name = Profile for example
path = $home\example
rules = example-rules