• Need the change the security for the particular user like remove write or delete or read access

  • 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.
 #53959  by nishant8900
 
Hi,

I have tried the change the security like to remove read, write or delete access to the particular user.
and need to assign new role to the existing user.

I have tried this code:
Code: Select all
import java.util.*;
import com.openkm.bean.Permission;
import com.openkm.api.OKMAuth;

try {
    String nodePath = "6aaa9bc3-e0d2-4240-9c17-29769fecad0f";
    Map<String, Integer> grantUsers = new HashMap<>();
    Map<String, Integer> revokeUsers = new HashMap<>();
    Map<String, Integer> grantRoles = new HashMap<>();

    grantRoles.put("ROLE_USER", Permission.READ );	
    Map<String, Integer> revokeRoles = new HashMap<>();
    OKMAuth.getInstance().changeSecurity(null, nodePath, grantUsers, revokeUsers, grantRoles, revokeRoles, false);
} catch (Exception e) {
    print(e);
}
and i'm getting this kind of error:
bsh.ParseException: Parse error at line 7, column 24. Encountered: ,

kindly helps me to resolve this issue.

Thanks.

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.