Magnolia 5.3 reached end of life on June 30, 2017. This branch is no longer supported, see End-of-life policy.
Action bar availability defines whether a particular section of the action bar is available. If the section is available, then action availability is checked.
For example, in the action bar configuration in the Contacts app:
root
section display on the root node only. The user sees the Add contact, Add folder and Import actions defined in the groups in the root
section.contact
section display on selection of a mgnl:contact
node type.deletedContact
section display on selection of a mgnl:contact
node type, but the IsDeletedRule
rule class limits action availability when a contact has been marked for deletion to the Publish deletion and Restore previous version actions. This rule returns true
if the item is a node and has the mgnl:deleted
mixin type.Node name | Value |
---|---|
actionbar |
|
sections |
|
root |
|
groups | |
availability | |
nodes | false |
root | true |
deletedContact |
|
groups | |
availability | |
nodeTypes | |
contact | mgnl:contact |
ruleClass | info.magnolia.ui.api.availability.IsDeletedRule |
deletedFolder | |
contact |
|
groups | |
availability | |
nodeTypes | |
contact | mgnl:contact |
Properties
availability
access
: Section is available if the current user has one of the listed roles.roles
<role>
: Name of the role that is permitted to execute the action.nodes
: Section is available if the selected item is a node.nodeTypes
: Sectionis available if the selected item is one of the node types listed.<node type>
: A valid node type such as mgnl:folder
.ruleClass
: Class that contains custom logic to check if the action is permitted on the selected item. A common example is info.magnolia.ui.api.availability.IsNotDeletedRule
which checks that the item is not marked for deletion. Your custom class must extend root
: Action is available at the workspace root level if true.properties
: Action is available if the selected item is a property.Here's the action bar:
Action bar availability is different from action availability where availability rules are defined on an individual action level and apply to each use of the action.