}
}
}
public void testAddToGroup() throws NotExecutableException, RepositoryException {
UserManager umgr = getUserManager(otherSession);
Group gr = getGroupAdminGroup(umgr);
Authorizable auth = umgr.getAuthorizable(uID);
try {
assertFalse(gr.addMember(auth));
// omit cond-save call.
} catch (AccessDeniedException e) {
// success as well.
}
auth = umgr.getAuthorizable(otherUID);
try {
assertFalse(gr.addMember(auth));
// omit cond-save call.
} catch (AccessDeniedException e) {
// success as well.
}
// not even user-admin group
gr = (Group) umgr.getAuthorizable(uAdministrators.getID());
auth = umgr.getAuthorizable(otherUID);
try {
assertFalse(gr.addMember(auth));
// omit cond-save call.
} catch (AccessDeniedException e) {
// success