Hi, I have a really simple test case as follows: public class UserManagerTests { private Repository repository; private Session superuser; private Session anonymous; Node testRootNode; @Before public void before() throws Exception { repository = new TransientRepository(); superuser = repository.login(new SimpleCredentials("admin", "admin".toCharArray())); anonymous = repository.login(new SimpleCredentials("anonymous", "anonymous".toCharArray())); testRootNode = superuser.getRootNode().addNode("test_" + Long.toString(System.currentTimeMillis())); superuser.save(); } @After public void after() throws Exception { testRootNode.remove(); superuser.save(); superuser.logout(); superuser = null; repository = null; } @Test public void testUserManager() throws Exception { AccessControlManager adminAcm = getAccessControlManager(superuser); AccessControlManager anonAcm = getAccessControlManager(anonymous); Assert.assertFalse(anonAcm.hasPrivileges(testRootNode.getPath(), privilegesFromName(Privilege.JCR_WRITE))); // something here to allow anon user to write to our test node adminAcm.setPolicy(testRootNode.getPath(), policy); Assert.assertTrue(anonAcm.hasPrivileges(testRootNode.getPath(), privilegesFromName(Privilege.JCR_WRITE))); } } How do I get/create a policy for the anonymous user which will allow the anonymous user to write to the test node? All the implementations of AccessControlPolicy are not visible to to my code. Regards Ben 2009/11/27 Ben Short > Hi, > > I'm trying to use the AccessControlManager to allow a user to have write > permissions to a node. But I can't see how to create a policy. > > Can anyone give me any pointers? > > Regards > > Ben Short >