permissionService.findNodesByAssignedPermissionForCurrentUser(PermissionService.CONTRIBUTOR, allow, includeContainingAuthorities, includeContainingPermissions)
permissionService.hasPermission(nodeRef, "Coordinator");
public boolean evaluate(Node node) {
Path path = node.getNodePath();
boolean afficher = false;
String parent=path.get(path.size()-1).toString(); //on récupère l'espace courant
// tester si l'utilisateur connecté est coordinateur, si le test est réussi on met afficher à true ;
return afficher;
}
Je ne suis pas sûr d'avoir compris exactement ce que veux faire goktan mais s'il s'agit juste de vérifier si un utilisateur est coordinateur sur un noeud (l'espace courant par exemple), je préfère utiliser :
permissionService.hasPermission(nodeRef, "Coordinator");
public class CheckinDocEvaluator extends BaseActionEvaluator
{
private static final long serialVersionUID = 5398249535631219663L;
/**
* @see org.alfresco.web.action.ActionEvaluator#evaluate(org.alfresco.web.bean.repository.Node)
*/
public boolean evaluate(Node node)
{
return (node.hasAspect(ContentModel.ASPECT_WORKING_COPY) &&
node.getProperties().get(ContentModel.PROP_WORKING_COPY_MODE) == null &&
node.hasPermission(PermissionService.CHECK_IN));
}
}
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.