session1.save();
}
public void testOperationsByOwner() throws Exception
{
Session session1 = repository.login(new CredentialsImpl("john", "exo".toCharArray()));
Node accessTestRoot1 = session1.getRootNode().getNode("accessTestRoot");
accessTestRoot1.addMixin("exo:privilegeable");
Node testByOwnerNode = accessTestRoot1.addNode("testByOwnerNode");
testByOwnerNode.addMixin("exo:owneable");
testByOwnerNode.addMixin("exo:privilegeable");
session1.save();
session1.logout();
accessTestRoot = (ExtendedNode)session.getRootNode().getNode("accessTestRoot");
accessTestRoot.setPermission(accessTestRoot.getSession().getUserID(), PermissionType.ALL);
accessTestRoot.removePermission("john");
accessTestRoot.removePermission(IdentityConstants.ANY);
accessTestRoot.setPermission("john", new String[]{PermissionType.READ});
ExtendedNode testByOwnerNodeSystem = (ExtendedNode)accessTestRoot.getNode("testByOwnerNode");
testByOwnerNodeSystem.setPermission(accessTestRoot.getSession().getUserID(), PermissionType.ALL);
testByOwnerNodeSystem.removePermission("john");
testByOwnerNodeSystem.removePermission(IdentityConstants.ANY);
testByOwnerNodeSystem.setPermission("john", new String[]{PermissionType.READ});
session.save();
session1 = repository.login(new CredentialsImpl("john", "exo".toCharArray()));
accessTestRoot1 = session1.getRootNode().getNode("accessTestRoot");
testByOwnerNode = accessTestRoot1.getNode("testByOwnerNode");
try
{
Property prop = testByOwnerNode.setProperty("prop1", "val1");