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.Content from pre 2016 and from language groups that have been closed.
Content is read-only.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.