Multi-select (selected items) action render based on role?

cancel
Showing results for 
Search instead for 
Did you mean: 
sychel
Active Member

Multi-select (selected items) action render based on role?

Jump to solution

Hello everyone,

Is it possible to render a multi-select (selected items) action based on role? Such as SiteManager, SiteConsumer ...

Alfresco default is like (Write, Delete, CreateChildren ...)

<multi-select>
    <action type="action-link" id="onActionDownload" icon="document-download" label="menu.selected-items.download" />
    <action type="action-link" id="onActionCopyTo" icon="document-copy-to" label="menu.selected-items.copy" notAspect="smf:smartFolder,smf:smartFolderChild"/>
    <action type="action-link" id="onActionMoveTo" icon="document-move-to" permission="Delete" label="menu.selected-items.move" notAspect="smf:smartFolder,smf:smartFolderChild"/>
    <action type="action-link" id="onActionAssignWorkflow" asset="document" icon="document-assign-workflow" label="menu.selected-items.assign-workflow"/>
    <action type="action-link" id="onActionDelete" icon="document-delete" permission="Delete" label="menu.selected-items.delete" notAspect="hwf:hybridWorkflow,sys:undeletable,smf:smartFolder" />
    <action type="action-link" id="onActionCloudSync" asset="document" icon="document-cloud-sync"  permission="CreateChildren" label="menu.selected-items.cloudSync" notAspect="sync:syncSetMemberNode,smf:smartFolder,smf:smartFolderChild" syncMode="ON_PREMISE" />
    <action type="action-link" id="onActionCloudSyncRequest" icon="document-request-sync" label="menu.selected-items.cloudRequestSync" hasAspect="sync:syncSetMemberNode" notAspect="smf:smartFolder,smf:smartFolderChild" syncMode="ON_PREMISE" />
</multi-select>

Thank you:smileyhappy:
1 Solution

Accepted Solutions
afaust
Master

Re: Multi-select (selected items) action render based on role?

Jump to solution

Technically, it is. Those roles are nothing more than permissions, so you could use them instead of Write etc. The main problem though would be that these permissions are not loaded / checked by default - only the limited set of Write etc. is loaded by default to not tax performance too much. You could configure the Repository tier component to also load additional permissions so you can use them in configuration. See the documentation to configure the permission list.

View solution in original post

1 Reply
afaust
Master

Re: Multi-select (selected items) action render based on role?

Jump to solution

Technically, it is. Those roles are nothing more than permissions, so you could use them instead of Write etc. The main problem though would be that these permissions are not loaded / checked by default - only the limited set of Write etc. is loaded by default to not tax performance too much. You could configure the Repository tier component to also load additional permissions so you can use them in configuration. See the documentation to configure the permission list.