This is a customization of the standard menu bar item that
mixes in the ability to determine whether or not the current user has the ability to create content
at the current rendered location. This was created for use in the document library (for items in the "Create..." menu
but is applicable for use anywhere where user access rights need to be verified.
- Copyright:
- Copyright (C) 2005-2020 Alfresco Software Limited
- License:
- GNU Lesser General Public License, see: Open Source Licensing
- Source:
Mixes In
Members
-
i18nScope :string
-
Set the i18n scope so that labels are picked up from the wrapped toolbar message scope.
Type:
- string
- Default Value:
- "Alfresco.DocListToolbar"
- Source:
Methods
-
filter(payload)
-
This function filters the menu item based on the supplied user access payload against the data in the "permission" attribute that should be set when the item is instantiated. This code is based on the "onUserAccess" function from the original YUI based DocumentLibrary "toolbar.js" widget.
Parameters:
Name Type Description payload
object The payload published on the filter topic -
postCreate()
-
Extended to add additional subscription to listen for changes to the filter. If the filter is not set to a path then it is not possible to create content.