01-20-2011 12:01 PM
if(serviceRegistry.getAuthorityService().getAuthoritiesForUser(theUserName) != null){
Set<String> theSet = serviceRegistry.getAuthorityService().getAuthoritiesForUser(theUserName);
if ((theSet.size() < 1) || (theSet.size() > 2)){
this.getLogger().logTechnicalError(EnumTraitementMetierLevel.ERREUR.getCode(), "L'utilisateur est dans plusieurs groupes : " + theSet.size());
return "";
}else{
String[] myElt = new String[Constantes.NB_MAX_GROUP_PER_USER];
int i = 0;
String theGroup = "";
Iterator<String> it = theSet.iterator();
while (it.hasNext()) {
myElt[i] = (String) it.next();
i++;
}
for (int j=0;j<myElt.length;j++){
if (!Constantes.THE_GROUP_EVERYONE.equals(myElt[j])){
theGroup = myElt[j].substring(Constantes.INT_COUNT_WORD_GROUP);
}
}
return theGroup;
}
}
01-26-2011 05:31 AM
<authentication runas="admin">user</authentication>In this way Alfresco will check for authentication for that user and then it will execute the WebScript for the current user as the admin user.01-26-2011 05:38 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.