05-11-2009 08:42 AM
05-12-2009 03:27 AM
05-12-2009 05:04 AM
Store STORE = new Store(Constants.WORKSPACE_STORE, "SpacesStore");
AuthenticationUtils.startSession(user, password);
AccessControlServiceSoapBindingStub accessControlService = WebServiceFactory.getAccessControlService();
Reference reference = new Reference(STORE, stringNodeUuid, null);
Predicate predicate = new Predicate(new Reference[] {reference}, STORE, null);
ACL[] acl = accessControlService.getACLs(predicate, null);
ACE[] ace = acl[0].getAces();
AccessStatus accessStatus = ace[0].getAccessStatus();
System.out.println(ace[0].getAuthority()); //Retorna 1r usuario que tiene permisos sobre el nodo
System.out.println(ace[0].getPermission()); //Retorna el permiso especificado para el usuario anterior
System.out.println(accessStatus.getValue()); //Retorna si tiene acceso o no al nodo
//Añadir permisos
ACE[] aces1 = new ACE[]{
new ACE(userToAdd, Constants.READ, AccessStatus.acepted),
};
ACL[] acls1 = accessControlService.addACEs(predicate, aces1);
Cualquier cosa que le veáis, soy todo oídos.05-12-2009 05:12 AM
05-12-2009 05:37 AM
05-15-2009 02:49 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.