public String createUser(Map<QName, Serializable> props, String userName) {
NodeRef newPerson = this.personService.createPerson(props);
this.permissionService.setPermission(newPerson, userName, this.permissionService.getAllPermission(), true);
String password = AuthenticationUtils.getUserPassword(userName);
this.authenticationService.createAuthentication(userName, password.toCharArray());
this.nodeService.setType(newPerson, DecathlonModel.TYPE_USER);
this.nodeService.setProperty(newPerson, DecathlonModel.PROP_DROITS, new ArrayList<String>());
return password;
}
J'aimerais que mes utilisateurs aient les droits administrateurs, getAllPermission ne le fais pas apparemment.javax.faces.el.EvaluationException: Exception while invoking expression #{DocumentDetailsDialog.startCorrection}
at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:156)
at javax.faces.component.UICommand.broadcast(UICommand.java:89)
at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:171)
at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:32)
at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)
at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:81)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
this.permissionService.setPermission(newPerson, userName, PermissionService.FULL_CONTROL, true);
caused by:
org.alfresco.repo.security.permissions.AccessDeniedException: Accès interdit. Vous n'avez pas la permission de réaliser cette opération.
caused by:
net.sf.acegisecurity.AccessDeniedException: Access is denied.
this.lockService.lock(nodeRef, LockType.WRITE_LOCK);
this.permissionService.setPermission(newPerson, userName, this.permissionService.getAllPermission(), true);
this.authorityService.addAuthority("GROUP_ALFRESCO_ADMINISTRATORS", userName);
En fait ça donne tous les droits sur le noeud cmerson, pas sur des espaces ou des documents.Effectivement j'ai créé un fichier de configuration pour mon espace ou les documents sont rangés (document-space.xml)
<view:acl view:inherit="false">
<view:ace view:access="ALLOWED">
<view:authority>GROUP_EVERYONE</view:authority>
<view:permission>Consumer</view:permission>
</view:ace>
</view:acl>
<view:permission>All</view:permission>
Dans mon fichier de config d'espace.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.