[DOCU-2488] Action availability by role example Created: 02/Jun/22  Updated: 10/Jun/22  Resolved: 10/Jun/22

Status: Closed
Project: Documentation
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Neutral
Reporter: Richard Gange Assignee: Ashraf Khamis
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Looking at this doc https://docs.magnolia-cms.com/product-docs/6.2/Apps/App-configuration/Action-definition.html#_action_availability

We need an example of what the configuration should look like for restriction by role. The table below the example doesn't clearly show how the layering should look.

For example:

actions: 
  activate: !override &activate
    class: info.magnolia.module.workflow.action.OpenPublicationDialogActionDefinition
    dialogName: workflow:publish
    icon: icon-publish
    catalog: website
    command: activate
    label: Request to Publish
    availability: 
      writePermissionRequired: true
      access: # ------------------------------ the example starts here
        roles: 
          editor: editor
          publisher: publisher


 Comments   
Comment by Ashraf Khamis [ 10/Jun/22 ]

Added an example of how to restrict an action by role to https://docs.magnolia-cms.com/product-docs/6.2/Apps/App-configuration/Action-definition.html#_action_availability and reinstated the table indentation at https://docs.magnolia-cms.com/product-docs/6.2/Apps/App-configuration/Action-definition.html#_action_availability_properties.

Generated at Mon Feb 12 01:27:35 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.