Module: alfresco/documentlibrary/_AlfCreateContentPermissionsMixin

alfresco/documentlibrary/_AlfCreateContentPermissionsMixin

This mixin provides helper functions that can be used to determine whether or not a the user has permission to create new content at the currently rendered context (e.g. the current location being shown in a document list)
Author:
  • Dave Draper
License:
Source:

Members

permission :string

The permission string for the widget. This is what will be evaluated against the current users permissions. This is given a default value of "CreateChildren" which assumes that content can be created but this should be set during instantiation based on the current user permissions for the current context.
Type:
  • string
Default Value:
  • "CreateChildren"
Source:

Methods

hasPermission(permissionString, userAccess)

Checks whether or not the current user has permission to create content.
Parameters:
Name Type Description
permissionString string The permission string for the widget being evaluated
userAccess object The user access data
Source:

onFilterChange(payload)

Disable the menu if the filter is not a path. This should always be processed before the onUserAccess function because it's the change in filter that will result in the change of user access data.
Parameters:
Name Type Description
payload object The details of the selected files.
Source:

onUserAcess(payload)

Sets the widget as either enabled or disabled based on the value returned by calling the hasPermission function.
Parameters:
Name Type Description
payload object The details of the selected files.
Source: