Hi. I have a Clone button on my Browser screen. I feel this is essentially an alternative to create an entity and should comply with the create entity permission granted to the user’s role. I currently use the following code:
void cloneItem()
{
if(security.isEntityOpPermitted(Customer.class, EntityOp.CREATE)) {
//continue with clone logic
}
else {
showNotification('Access denied. Operation "Clone" is denied for the instance of entity "Customer" ', NotificationType.ERROR)
}
}
It would be nice if there were an XML attribute to do this for me, similar to constraintOperationType. Maybe permissionOperationType?
<actions>
<action id="create"/>
<action id="edit"/>
<action id="remove"/>
<action id="clone"
invoke="cloneItem"
constraintOperationType="create"
permissionOperationType="create"
trackSelection="true"/>
</actions>