• Changing default roles in OpenKM 6.2.2

  • 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.
 #21270  by jllort
 
Why do you need to change it. Which is the problem you got with this role names ? you're connecting to some ldap or similar because is not good idea do this kind of change at same time, better step by step.

You should change applicationContext.xml ( into war file ) and obviously in Administration -> configuration parameters.

If you look in this forum for ROLE_ADMIN you'll find other post about that.
 #21284  by jho_ed
 
jllort wrote:Why do you need to change it. Which is the problem you got with this role names ? you're connecting to some ldap or similar because is not good idea do this kind of change at same time, better step by step.

You should change applicationContext.xml ( into war file ) and obviously in Administration -> configuration parameters.

If you look in this forum for ROLE_ADMIN you'll find other post about that.
The reason is that we are running other applications than OpenKM as well and also having a number of other roles/groups in our LDAP. Having generic names like ROLE_USER and ROLE_ADMIN is very confusing. For which application are you ADMIN/USER for? If we only were using OpenKM and having no other roles/groups in our LDAP there would not be a problem.

I have looked at the other posts and there are a number of people who would like to know how to change the role names, but there does not seem to be a straight forward answer/how to to that. Hence my raised question. To me the number of questions indicate a need for a how to for this task. At the moment I do not even know where to start and build such a how-to myself.
 #21303  by jllort
 
I suggest doing in two steps. First integrate with ldap with default roles name ( simply create these and after you will rename ok ?) and ensure users, roles etc... the configuration is right.

Then you should do some changes:
1- Administration -> configuration parameters should change:
default.admin.role
default.user.role
2- Stop OpenKM
3- Edit war file and change /WEB-INF/applicationContext.xml the entries with ROLE_ADMIN to your new role name
 #39001  by jllort
 
Did you also change the applicationContext.xml configuration file ?

Take on mind that this kind of changes cannot be done on-the-fly. You have to stop the application, make the change and start the application again.
 #40190  by richbcph
 
Followed the wiki exactly and now I get:

HTTP Status 404 - /OpenKM
type Status report
message /OpenKM
description The requested resource is not available.

If I revert back the changes to the XML and restore my role_user/admin everything comes back up. I wonder if the group names cannot accept spaces. My group for users would be AAGRP - Users and AAGRP - OUadmins

Does it not accept spaces in name or is there something else I should be editing beside the xml? I copied the new role names exactly as they currently are (case sensitive).

Thanks
Rich

PS on 6.3 if that makes a difference
 #40192  by pavila
 
Please, stop Tomcat, clean $TOMCAT_HOME/logs and start Tomcat again. Once it's up, please post the catalina.log file, but zipped.
 #40200  by richbcph
 
Also what is very odd to me is when I make the change in the xml file and restart tomcat the website loads up and logs in directly as me without me entering a password! I thought it was a fluke the first time it happened but just after the change and tomcat restart it assumed me and went in without any password.

Heres what I did.

Make change to role names.
make changes to xml.
Stop tomcat.
Restart tomcat.
Refresh OpenKM page
Page should get 404. *Do not close page
Change xml doc back to ROLE_ADMIN
Restart tomcat
Refresh webpage. You should login as last user without entering password.

It only seems to do this once though.

Anyone else confirm this?
 #40205  by pavila
 
I haven't realize until now but, are you really using OpenKM 6.2.2 ? This is a Professional version and it's very, very old.

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.