Capability Definitions

A capability represent a CUE user interface component and its associated functionality. A capability can be enabled or disabled for individual users or groups of users. By default, CUE / CUE Content Store are delivered with a standard set of capabilities that represent all the standard CUE sidepanels and metadatapanels. This means that CUE can be configured to deny some users (such as bloggers and freelance journalists, for example) access to certain side panels and metadata data panels. Capabilities are enabled / disabled when creating and editing user definitions in Web Studio. For details, see Editing Users and Persons.

The default capabilities are sufficient for controlling access to a standard CUE installation. If however, you extend CUE by adding your own web components, then you may wish to control access to these additions as well, and to be able to do that you need to create and upload your own capability definition resources.

Here is a very simple capability definition file:

<?xml version="1.0" encoding="UTF-8"?>
<capabilities xmlns="http://xmlns.escenic.com/2020/capability"
              xmlns:ui="http://xmlns.escenic.com/2008/interface-hints">

  <capability-group name="myextension">
    <ui:label>My extension</ui:label>
  </capability-group>

  <capability name="my.sidepanel.myextension" ref-capability-group="myextension">
    <ui:label>My extension side panel</ui:label>
    <ui:description>My extension side panel</ui:description>
    <ui:value-if-unset>true</ui:value-if-unset>
  </capability>
  <capability name="my.metadata.myextension" ref-capability-group="myextension">
    <ui:label>My extension metadata panel</ui:label>
    <ui:description>My extension metadata panel</ui:description>
    <ui:value-if-unset>true</ui:value-if-unset>
  </capability>
</capabilities>

This file creates two capabilities, one for a custom side panel component and one for a custom metadata panel component. The name attributes must match the capability names specified in the configurations of the CUE web components you have created (see the CUE User Guide for details). You are free to name capabilities as you choose, but you should take care to avoid the names of the default capabilities delivered with CUE. The default capabilities all have names that start with either cue.sidepanel, cue.metadata or cue.search, so you can easily avoid name clashes by using your own prefix instead of cue.

You can control the capabilities' labels in Web Studio with the ui:label elements, and their default settings with the ui:value-if-unset elements.

The capability capability-group element at the start of the file groups together the capabilities that reference it. Since all three capabilities reference the same group, they are displayed as a group in Web Studio and can be enabled / disabled either as a group or individually.

You can actually create a hierarchy of capability groups, making it possible for the Web Studio user to enable and disable groups at different levels:

<?xml version="1.0" encoding="UTF-8"?>
<capabilities xmlns="http://xmlns.escenic.com/2020/capability"
              xmlns:ui="http://xmlns.escenic.com/2008/interface-hints">

  <capability-group name="myextension">
    <ui:label>My extension</ui:label>
      <capability-group name="mypanels">
        <ui:label>My panels</ui:label>
      </capability-group>
  </capability-group>

  <capability name="my.sidepanel.myextension" ref-capability-group="mypanels">
    <ui:label>My extension side panel</ui:label>
    <ui:description>My extension side panel</ui:description>
    <ui:value-if-unset>true</ui:value-if-unset>
  </capability>
  <capability name="my.metadata.myextension" ref-capability-group="mypanels">
    <ui:label>My extension metadata panel</ui:label>
    <ui:description>My extension metadata panel</ui:description>
    <ui:value-if-unset>true</ui:value-if-unset>
  </capability>
</capabilities>

You will find the default capability definitions in the Content Store starter pack installation-root/contrib/starter-pack/capabilities/cue-defaults.xml. These capabilities are already defined, so you cannot remove any of them. You can, however, change the default capabilities by editing this file in the following ways and uploading your modified version:

  • Change or translate the labels of capabilities and capability groups

  • Change the default values (ui:value-if-unset) of capabilities and capability groups

  • Reorganize the group structure (thereby changing the layout / structure in Web Studio).

In general it is recommended that you create one or more separate capability files for your own web components. You can, however add them to default capability groups defined in cue-defaults.xml if you wish. For example:

  ...
  <capability name="my.sidepanel.myextension" ref-capability-group="cue-side-panel">
    <ui:label>My extension side panel</ui:label>
    <ui:description>My extension side panel</ui:description>
    <ui:value-if-unset>true</ui:value-if-unset>
  </capability>
  ...