Page 1 of 1

ROLE_USER group modify

PostPosted:Tue Jan 02, 2018 3:55 pm
by gennari
Hi there,
I am testing OpneKM 6.3.4 with Active Direcotory authentication. I would like to use not default groups name, so I successfully changed ROLE_ADMIN in OKM_ADMIN and user of this AD group can login and administer without problems.

I am trying to do same thing with ROLE_USER, I wuold like to change it in OKM_USER>

I created a row in okm_role table
I changed default.user.role property
I changed webapps/OpenKM/WEB-INF/appContext.xml with this row <beans:property name="rolePrefix" value="OKM_"/>
in openkm.log I can find this:
Code: Select all
logs/openkm.log:2018-01-02 16:40:09,874 [localhost-startStop-1] [] INFO  com.openkm.core.Config - RELOAD - default.user.role=OKM_USER
But if I try to log with a user in AD group OKM_USER I get this error:
Code: Select all
com.openkm.core.RepositoryException: PathNotFoundException: 52fd6d8c-993c-4f52-b7d8-488a60b29832 : /okm:trash

If I put user in ROLE_USER AD group, he can log-in. For me it is very strange.

Can you help me please?

Thanks in advance.

Re: ROLE_USER group modify

PostPosted:Wed Jan 03, 2018 4:21 pm
by jllort
Try to authenticate as super user -> if you do not get any error from this scenario then try with standard user ( ROLE_USER or in your case OKM_USER ), if you have some issue ( might be ) then you need to update values into the table OKM_NODE_ROLE_PERMISSION

something like:
Code: Select all
update OKM_NODE_ROLE_PERMISSION set NRP_ROLE='OKM_USER' where NRP_ROLE='ROLE_USER';
Finally you must reindex the lucene search engine -> Administration > tools > rebuild indexes -> choose Lucene indexes

Remember to change the configuration parameter named default.user.role

Re: ROLE_USER group modify

PostPosted:Thu Jan 04, 2018 8:31 am
by gennari
Ok,
it is working done!

Thank you very much.

genna