use of com.developmentontheedge.be5.test.TestSession in project be5 by DevelopmentOnTheEdge.
the class UserHelper method initGuest.
public void initGuest(Request req) {
Locale locale = Locale.US;
String remoteAddr = "";
Session session;
if (req != null) {
locale = req.getLocale();
remoteAddr = req.getRemoteAddr();
session = req.getSession();
} else {
session = new TestSession();
}
if (ModuleLoader2.getDevRoles().size() > 0) {
saveUser("dev", ModuleLoader2.getDevRoles(), ModuleLoader2.getDevRoles(), locale, remoteAddr, session);
} else {
List<String> roles = Collections.singletonList(RoleType.ROLE_GUEST);
saveUser(RoleType.ROLE_GUEST, roles, roles, locale, remoteAddr, session);
}
}
Aggregations