Page 1 of 1

How to create Moderator role.

PostPosted:Thu May 17, 2012 9:56 am
by hzen
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
Code: Select all
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();
	}
It works in most cases but does not prevent uploader from remove permission of ModRoles.


Is there any chance to do this?

any help will be appreciated.

Thank you.

Re: How to create Moderator role.

PostPosted:Fri May 18, 2012 3:48 pm
by jllort
It will be more easy make a profile and remove show tab administrator and administrator menu ? Althought have AdminRole UI will not show administration tab etc...