document-actions

[
  {
    "evaluator": "and",
    "condition": [
      {
        "evaluator": "not",
        "condition": {
          "evaluator": "document-has-feature",
          "condition": "f:multilingual"
        }
      },
      {
        "evaluator": "not",
        "condition": {
          "evaluator": "document-has-feature",
          "condition": "f:translation"
        }
      },
      {
        "evaluator": "document-has-feature",
        "condition": "f:locale"
      }
    ],
    "config": {
      "document-actions": [
        {
          "key": "add-to-master-document",
          "title": "Add to Master Document",
          "iconClass": "fa fa-pencil",
          "module": "app/actions/document/add-to-master-document",
          "allowPermission": [
            "update"
          ]
        }
      ]
    }
  },
  {
    "evaluator": "and",
    "condition": [
      {
        "evaluator": "not",
        "condition": {
          "evaluator": "document-has-feature",
          "condition": "f:translation"
        }
      },
      {
        "evaluator": "document-has-feature",
        "condition": "f:multilingual"
      }
    ],
    "config": {
      "document-actions": [
        {
          "key": "add-translated-document",
          "title": "Add Translated Document",
          "iconClass": "fa fa-pencil",
          "module": "app/actions/document/add-translated-document",
          "allowPermission": [
            "update"
          ]
        }
      ]
    }
  },
  {
    "evaluator": "document-is-file",
    "condition": true,
    "config": {
      "document-actions": [
        {
          "key": "upload-attachment",
          "title": "Upload Attachment",
          "iconClass": "glyphicon glyphicon-upload",
          "module": "app/actions/document/upload-attachment",
          "allowPermission": [
            "update"
          ]
        }
      ]
    }
  },
  {
    "evaluator": "document-is-folder",
    "condition": true,
    "config": {
      "document-actions": [
        {
          "key": "refresh-document",
          "title": "Refresh Folder",
          "iconClass": "glyphicon glyphicon-new-window",
          "module": "app/actions/document/refresh-document",
          "allowAuthority": [
            "manager"
          ]
        }
      ]
    }
  },
  {
    "evaluator": "and",
    "condition": [
      {
        "evaluator": "document-is-locked",
        "condition": true
      },
      {
        "evaluator": "document-is-locked-by-current-user",
        "condition": false
      }
    ],
    "config": {
      "document-actions": [
        {
          "key": "force-unlock-document",
          "title": "Force Unlock Document",
          "iconClass": "fa fa-unlock",
          "module": "app/actions/document/force-unlock-document",
          "allowAuthority": [
            "manager",
            "owner"
          ]
        }
      ]
    }
  },
  {
    "evaluator": "document-is-locked-by-current-user",
    "condition": true,
    "config": {
      "document-actions": [
        {
          "key": "unlock-document",
          "title": "Unlock Document",
          "iconClass": "fa fa-unlock",
          "module": "app/actions/document/unlock-document",
          "allowPermission": [
            "update"
          ]
        }
      ]
    }
  },
  {
    "evaluator": "document-has-feature",
    "condition": "f:locale",
    "config": {
      "document-actions": [
        {
          "key": "remove-locale",
          "title": "Remove {{msg 'types.Text.locale'}}",
          "iconClass": "fa fa-pencil",
          "module": "app/actions/document/remove-locale",
          "allowPermission": [
            "update"
          ]
        }
      ]
    }
  },
  {
    "evaluator": "document-has-feature",
    "condition": "f:multilingual",
    "config": {
      "document-actions": [
        {
          "key": "remove-multilingual-feature-from-document",
          "title": "Remove Multilingual",
          "iconClass": "fa fa-pencil",
          "module": "app/actions/document/remove-multilingual-feature-from-document",
          "allowPermission": [
            "update"
          ]
        }
      ]
    }
  },
  {
    "evaluator": "not",
    "condition": {
      "evaluator": "document-has-feature",
      "condition": "f:locale"
    },
    "config": {
      "document-actions": [
        {
          "key": "set-locale",
          "title": "Set {{msg 'types.Text.locale'}}",
          "iconClass": "fa fa-pencil",
          "module": "app/actions/document/set-locale",
          "allowPermission": [
            "update"
          ]
        }
      ]
    }
  },
  {
    "evaluator": "and",
    "condition": [
      {
        "evaluator": "document-is-locked",
        "condition": false
      },
      {
        "evaluator": "document-is-file",
        "condition": true
      }
    ],
    "config": {
      "document-actions": [
        {
          "key": "lock-document",
          "title": "Lock Document",
          "iconClass": "fa fa-lock",
          "module": "app/actions/document/lock-document",
          "allowPermission": [
            "update"
          ]
        }
      ]
    }
  },
  {
    "evaluator": "and",
    "condition": [
      {
        "evaluator": "not",
        "condition": {
          "evaluator": "document-has-feature",
          "condition": "f:multilingual"
        }
      },
      {
        "evaluator": "not",
        "condition": {
          "evaluator": "document-has-feature",
          "condition": "f:translation"
        }
      }
    ],
    "config": {
      "document-actions": [
        {
          "key": "add-multilingual-feature-to-document",
          "title": "Make Multilingual",
          "iconClass": "fa fa-pencil",
          "module": "app/actions/document/add-multilingual-feature-to-document",
          "allowPermission": [
            "update"
          ]
        }
      ]
    }
  },
  {
    "config": {
      "document-actions": [
        {
          "key": "add-feature",
          "title": "Add Feature",
          "iconClass": "glyphicon glyphicon-remove",
          "module": "app/actions/feature/add-feature",
          "action": "add-feature",
          "allowPermission": [
            "update"
          ]
        },
        {
          "key": "delete-document",
          "title": "Delete Document",
          "iconClass": "glyphicon glyphicon-remove",
          "module": "app/actions/document/delete-document",
          "allowPermission": [
            "delete"
          ]
        },
        {
          "key": "change-type",
          "title": "Change Type",
          "iconClass": "glyphicon glyphicon-pencil",
          "module": "app/actions/document/change-type",
          "allowAuthority": [
            "manager"
          ]
        },
        {
          "key": "change-qname",
          "title": "Change QName",
          "iconClass": "glyphicon glyphicon-pencil",
          "module": "app/actions/document/change-qname",
          "allowAuthority": [
            "manager"
          ]
        },
        {
          "key": "refresh-document",
          "title": "Refresh Document",
          "iconClass": "glyphicon glyphicon-new-window",
          "module": "app/actions/document/refresh-document",
          "allowAuthority": [
            "manager"
          ]
        },
        {
          "key": "view-in-api",
          "title": "View in API",
          "iconClass": "glyphicon glyphicon-new-window",
          "module": "app/actions/document/view-in-api",
          "allowAuthority": [
            "manager"
          ]
        },
        {
          "key": "view-in-admin-console",
          "title": "View in Admin Console",
          "iconClass": "glyphicon glyphicon-new-window",
          "module": "app/actions/document/view-in-admin-console",
          "allowAuthority": [
            "manager"
          ]
        },
        {
          "key": "enable-inherit-propagated-authorities",
          "title": "Enable Inherit Authorities",
          "iconClass": "glyphicon glyphicon-share",
          "module": "app/actions/document/enable-inherit-propagated-authorities",
          "allowAuthority": [
            "contributor",
            "collaborator",
            "editor",
            "manager"
          ]
        },
        {
          "key": "disable-inherit-propagated-authorities",
          "title": "Disable Inherit Authorities",
          "iconClass": "glyphicon glyphicon-share",
          "module": "app/actions/document/disable-inherit-propagated-authorities",
          "allowAuthority": [
            "contributor",
            "collaborator",
            "editor",
            "manager"
          ]
        }
      ]
    }
  },
  {
    "evaluator": "document-attachment-matches",
    "condition": "default:application/zip",
    "config": {
      "document-actions": [
        {
          "key": "unzip-to",
          "title": "Unzip to...",
          "iconClass": "fa fa-file-archive-o",
          "module": "app/actions/document/unzip-to",
          "allowPermission": [
            "read"
          ]
        }
      ]
    }
  },
  {
    "evaluator": "document-has-attachment",
    "condition": "default",
    "config": {
      "document-actions": [
        {
          "key": "download-document",
          "title": "Download",
          "iconClass": "glyphicon glyphicon-download",
          "module": "app/actions/document/download-document",
          "allowPermission": [
            "read"
          ]
        },
        {
          "key": "view-in-browser",
          "title": "View in Browser",
          "iconClass": "glyphicon glyphicon-new-window",
          "module": "app/actions/document/view-in-browser",
          "allowPermission": [
            "read"
          ]
        }
      ]
    }
  },
  {
    "evaluator": "and",
    "condition": [
      {
        "evaluator": "document-is-association",
        "condition": false
      },
      {
        "evaluator": "document-is-favorite",
        "condition": false
      }
    ],
    "config": {
      "document-actions": [
        {
          "key": "add-to-favorites",
          "title": "Add to Favorites",
          "iconClass": "fa fa-star-o",
          "module": "app/actions/document/add-to-favorites"
        }
      ]
    }
  },
  {
    "evaluator": "and",
    "condition": [
      {
        "evaluator": "document-is-association",
        "condition": false
      },
      {
        "evaluator": "document-is-favorite",
        "condition": true
      }
    ],
    "config": {
      "document-actions": [
        {
          "key": "remove-from-favorites",
          "title": "Remove from Favorites",
          "iconClass": "fa fa-star",
          "module": "app/actions/document/remove-from-favorites"
        }
      ]
    }
  },
  {
    "evaluator": "document-is-association",
    "condition": false,
    "config": {
      "document-actions": [
        {
          "key": "copy-to",
          "title": "Copy To...",
          "iconClass": "glyphicon glyphicon-share",
          "module": "app/actions/document/copy-to",
          "allowAuthority": [
            "contributor",
            "collaborator",
            "editor",
            "manager"
          ]
        },
        {
          "key": "move-to",
          "title": "Move To...",
          "iconClass": "glyphicon glyphicon-share-alt",
          "module": "app/actions/document/move-to",
          "allowAuthority": [
            "editor",
            "manager"
          ]
        },
        {
          "key": "start-workflow",
          "title": "Start Workflow",
          "iconClass": "glyphicon glyphicon-hand-up",
          "module": "app/actions/document/start-workflow",
          "allowAuthority": [
            "contributor",
            "collaborator",
            "editor",
            "manager"
          ]
        }
      ]
    }
  },
  {
    "evaluator": "document-has-feature",
    "condition": "f:translation",
    "config": {
      "document-actions": [
        {
          "key": "remove-from-master-document",
          "title": "Remove from Master Document",
          "iconClass": "fa fa-pencil",
          "module": "app/actions/document/remove-from-master-document",
          "allowPermission": [
            "update"
          ]
        }
      ]
    }
  }
]```