• Unable to do Write operations using api

  • We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
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.
 #53956  by nishant8900
In openkm 6.3 CE version that we are using.
https://docs.openkm.com/kcenter/view/ok ... agger.html
I can able to do read operation using API , can able to fetch folder's and its properties ,children folders etc.
but while doing Write operations like put ,create methods unable to do it. May be because of LDAP Connectivity.
But I'm not sure LDAP connectivity is the reason .if it is the reason kindly give some alternative solution or else give some suggestions.
And one more thing, unable to do the write operation using SCRIPTING TOOL in the openkm also.
This is the code we are tried to evaluate:
Code: Select all
import com.openkm.api.OKMAuth;

try {
     OKMAuth.getInstance().createRole(null, "ROLE_TEST", true);
 } catch (Exception e) {
     //  e.printStackTrace();
We are getting this kind of exception in both SCRIPTING TOOL and SWAGGER API
org.apache.commons.lang.NotImplementedException: createRole

Currently we are using LDAP principal adapter. and we are able to get the users from AD successfully.
 #53964  by jllort
Obviously, when OpenKM is integrated with AD you can only read data from the AD, you can not apply changes there ( otherwise you will have a security break in your AD ). All the changes must always be done from AD side, OpenKM is a slave reader.
 #53971  by nishant8900
Hi ,
First of all i will explain my logic

there are two types of roles and we will assume like
i)Lead - have all the access like (READ , WRITE , DELETE , SECURITY)
ii)User - have read only access.
important things is we are using LDAP.

because of LDAP we unable to mapping the roles to the users .
so , is there any programmatical way to achieve this?

kindly give the suggestion to this.

 #53976  by jllort
1- One thing is a role ( for example ROLE_USER ) and another is the security grants ( READ, WRITE etc... ). For example in a openkm node like /okm:root/test.pdf can assign ROLE_USER with READ access and for /okm:root/test2.pdf assign ROLE_USER with READ and WRITE
2- About AD integration, in this scenario, the users and roles only can be managed from the AD. You can not modify the AD otherwise will be a security break.

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.