*/
@Transactional(propagation = Propagation.REQUIRED, readOnly = true)
public class RightsServiceCoreImpl extends AbstractCore implements RightsServiceCore {
@Override
public List<String> authenticatedUzerRights() {
UzerDTO user = (UzerDTO) getSession().getAttribute("user");
List<String> rights = new ArrayList<String>();
if (user != null) {
rights = ProfileHelper.getRights(user.getProfile());
if ((user.getProgramsWithEditionRights() != null) && !user.getProgramsWithEditionRights().isEmpty()) {
rights.add(ProfileHelper.SPECIFIC_PROGRAMS_EDITION);
rights.add(ProfileHelper.SPECIFIC_PROGRAMS_CONSULTATION);
}
if ((user.getProgramsWithConsultationRights() != null) && !user.getProgramsWithConsultationRights().isEmpty()) {
rights.add(ProfileHelper.SPECIFIC_PROGRAMS_CONSULTATION);
}
}
return rights;