Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Summary

actionbar - enabled/disabled visible/hidden

based on selected node/item

based on roles

 

Availability

...

Problem

The action bar can take several states within one sub-app.

...

  • Action bar definition should define two things:
    • the structure: sections, groups, and all possible actions in these groups, in one single place. This ensures proper ordering of actions at all time
    • the states that describe e.g. the section titles, the set of actions displayed, and potential substates. This mechanism should allow for additive composition of states (think of the use case for an optional AND editable area in page editor)
  • Implementing context sensitivity then only means to configure these states properly and toggle between them.
  • (warning)It is likely that context sensitivity is not handled at all at the action bar level, but rather straight on the actions.
    • If so, the action bar definition is reduced to its sole structure.
    • Edge case (page editor): do we provide a way to configure context-sensitive section titles?

Decision

-

 

Access Control

 

...

Configuration Proposal

Given the base path /modules/foo-app-bar/apps/bar/subApps/workbenchbrowser/

Node nameValue
  • actions
-
    • addBar
-
    • addCocktail
-
    • editBar

-

      • class
info.magnolia.ui.admincentral.action.EditDialogActionDefinition
      • dialogName
foo-app-bar:bars
      • i18nBasename
foo.bar.actions.edit
      • icon
icon-edit
      • label
Edit
      • nodeType
foo:bar
    • editCocktail
-
      • extends
../editBar
      • implementationClass
org.foo.app.bar.action.EditCocktailAction
      • nodeType
foo:cocktail
    • delete
-
      • class
info.magnolia.ui.admincentral.action.DeleteItemActionDefinition
      • icon
icon-trash
      • label
Delete item
      • visible
-
        • voters
-
          • role
-
            • allow
-
              • 0
admin
              • 1
editor
            • class
info.magnolia...RoleVoter
          • type
-
            • allow
-
              • 0
foo:bar
            • deny
-
              • 0
foo:readonlybar
            • class
info.magnolia.ui...WorkbenchSelectionTypeVoter
          • instance
-
            • allow
-
              • 0
magnoliaAuthor
            • class
info.magnolia...SystemInstanceVoter
          • op
AND
      • disabled
-
        • voters
-
          • multiselect
-
            • class
info.magnolia.ui...WorkbenchMultipleSelectionVoter
          • nullselect
-
            • class
info.magnolia.ui...WorkbenchNullSelectionVoter
          • rootselect
-
            • class
info.magnolia.ui...WorkbenchRootSelectionVoter
          • op
OR

...

  • An option is to use voters for both visibility and disablement of an action (see delete action).
  • We may then consider a default configuration for content subApps