Subversion Repositories bacoAlunos

Compare Revisions

Ignore whitespace Rev 1429 → Rev 1554

/branches/v3/impl/src/java/pt/estgp/estgweb/services/authenticate/AuthenticateService.java
128,6 → 128,12
if(u.getRoles() == null || u.getRoles().trim().length() == 0)
u.setRoles(Globals.ROLE_INVITED);
 
/**CHECK BASIC SYSTEM ROLES**/
if(u instanceof Teacher && !u.hasRole(Globals.TEACHER_ROLE))
u.addRole(Globals.TEACHER_ROLE);
if(u instanceof Student && !u.hasRole(Globals.STUDENT_ROLE))
u.addRole(Globals.STUDENT_ROLE);
 
DaoFactory.getUserSessionDaoImpl().reattach(userSession);
return userSession;
}