Well, the problem has a solution with methods like those bellow. But minor
changes are necessary in AuthenticationManager.java,
AuthenticationUtil.java, AuthenticateAction.java, because now for them
SUCCESS in authentication means always and only a non-null EPerson in
Context.
-------------------------
public int authenticate(Context context,
String username,
String password,
String realm,
HttpServletRequest request)
throws SQLException {
HttpSession session = request.getSession();
. . .
if (externalUser(username, password)) {
Group g4 = Group.findByName(context, G4);
int g4id = g4.getID();
Integer g4ID = Integer.valueOf(g4id);
session.setAttribute(G4KEY, g4ID);
return SUCCESS;
}
. . .
}
public int[] getSpecialGroups(Context context,
HttpServletRequest request) {
try {
HttpSession session = request.getSession();
Integer g4ID = (Integer) session.getAttribute(G4KEY);
if (g4ID != null) {
int g4id = g4ID.intValue();
return new int[] {g4id};
}
}
catch (Exception e) {
}
return new int[0];
}
>
--
You received this message because you are subscribed to the Google Groups
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.