• How to create Moderator role.

  • OpenKM has many interesting features, but requires some configuration process to show its full potential.
OpenKM has many interesting features, but requires some configuration process to show its full potential.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #15615  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.
 #15630  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...

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.