I have next task - prohibit all users(except admin) to delete a content in Alfresco. I'm use a permission service for that, but it doesn't work:
private void setReadOnly(ScriptNode node) {
permissionService.deletePermissions(node.getNodeRef());
permissionService.setPermission(node.getNodeRef(),
PermissionService.ALL_AUTHORITIES, PermissionService.CONSUMER, true);
}
But if i'm add my user if other group(for example - Template designer) and than add new permission for blocking content from Alfresco Share(for example group-"TEMPLATE_DESIGNER" role-"COORDINATOR") - after that my user must delete content, add new content(if it folder) and other... Another way to solve my problem -
private void setReadOnly(ScriptNode node) {
permissionService.deletePermissions(node.getNodeRef());
permissionService.setInheritParentPermissions(node.getNodeRef(), false);
}
but it is not suitable for some reason. Please, answer - how to prohibit delete a content for all users(except admin)? Thank you.