Home > database >  JabackRabbit increase after the user, and some of the user login, but not to operate the node
JabackRabbit increase after the user, and some of the user login, but not to operate the node

Time:10-01

1, the XML configuration as follows
Anonymous user name (' anonymous' is the default value)
-->
Administrator user id (the default value if param is missing is the 'admin')
-->


2,
//admin user login, create a new user as follows
If (js. GetUserManager (.) getAuthorizable (" anonymous ")==null) {
Js. GetUserManager (.) createUser (" private ", "$20171208 $");
Js. The save ();
}
PrivateSession=repository. The login (new SimpleCredentials (" private ", "$20171208 $". ToCharArray ()));
PrivateRoot. GetSession (). The save ();



String staffId=(String) params. Get (" staffId ");
The Node staffIdRoot=null;
Try {
StaffIdRoot=JcrUtils. GetOrAddNode (enclosing privateRoot, staffId);//here at javax.mail. JCR. AccessDeniedException: Access denied.
} the catch (Exception e) {
The log. The error (" error processing repo objects ", e);
e.printStackTrace();
}
Return staffIdRoot;

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
StaffIdRoot=JcrUtils. GetOrAddNode (enclosing privateRoot, staffId);//here at javax.mail. JCR. AccessDeniedException: Access denied.
Can give private users admin user permissions authorization
  • Related