jdevine Posted January 19, 2010 Share Posted January 19, 2010 I am using the code below to create a folder in the repository. Is there a way that I can expand on this to grant ROLE_USER Write + Delete + Read permissions for this folder?I am running version 3.7.Thanks in advance, JimCode:JServer server = new JServer();server.setUsername("jasperadmin|testdev");server.setPassword("jasperadmin");server.setUrl("http://localhost:8080/jasperserver-pro/services/repository");WSClient ws = server.getWSClient();System.out.println("ws: " + ws);ResourceDescriptor rd = new ResourceDescriptor();rd.setWsType(ResourceDescriptor.TYPE_FOLDER);rd.setParentFolder(""); rd.setIsNew(true);rd.setName("MyFolder");rd.setLabel("MyFolder"); rd.setUriString("/MyFolder");ws.addOrModifyResource(rd, null); Link to comment Share on other sites More sharing options...
jdevine Posted January 19, 2010 Author Share Posted January 19, 2010 I see some documentation in the WS pdf, but how do I invoke the command?Also, what are these permission masks? I want to do something like the code below.I assume that I need to connect to a different url (jasperserver-pro/services/PermissionsManagementService), but it is not clear how I do that to obtain access to the PermissionManagementService so I can call putPermission. Code: Post Edited by jdevine at 01/19/2010 19:07 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now