-->
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