Hi everybody,
I need to create a Moderator role, who are always granted all permission to all documents, folder...
someone like AdminRoles but cannot change OpenKM configuration.
I'm now using script like
Is there any chance to do this?
any help will be appreciated.
Thank you.
I need to create a Moderator role, who are always granted all permission to all documents, folder...
someone like AdminRoles but cannot change OpenKM configuration.
I'm now using script like
Code: Select all
It works in most cases but does not prevent uploader from remove permission of ModRoles.if (eventType.equals("CREATE_DOCUMENT") ||eventType.equals("CREATE_FOLDER")) {
String userId = session.getUserID();
String path = eventNode.getPath();
OKMAuth oKMAuth = OKMAuth.getInstance();
try {
oKMAuth.grantRole(null, path, "ModRoles", Permission.WRITE, true);
oKMAuth.grantRole(null, path, "ModRoles", Permission.DELETE, true);
oKMAuth.grantRole(null, path, "ModRoles", Permission.SECURITY, true);
oKMAuth.grantRole(null, path, "ModRoles", Permission.READ, true);
}catch(Exception e) {
e.printStackTrace();
}
Is there any chance to do this?
any help will be appreciated.
Thank you.
