On enlève le chairman et on fait confCurrent = null

This commit is contained in:
Frederic Debuire
2008-02-26 09:43:37 +00:00
parent 8a78b428b8
commit b2c7a4f60a
2 changed files with 12 additions and 2 deletions

View File

@@ -251,10 +251,14 @@ public class AddConferenceController extends AbstractWizardFormController {
if (action == null || action.equals("")) if (action == null || action.equals(""))
{ {
logger.info(this.getClass().toString() + " dans le formBackingObject et dans le if (create new !)"); logger.info(this.getClass().toString() + " dans le formBackingObject et dans le if (create new !)");
if (! conferenceManager.canCreateConference(SessionService.getInstance().getCurrentUserLogin())){ if (! conferenceManager.canCreateConference(SessionService.getInstance().getCurrentUserLogin())) {
throw new ModelAndViewDefiningException(new ModelAndView("denied")); throw new ModelAndViewDefiningException(new ModelAndView("denied"));
} }
SessionService.getInstance().resetCurrentConference();
criteria = new HashSet<CriterionBean>(); criteria = new HashSet<CriterionBean>();
criteriaAll = new HashSet<CriterionBean>(); criteriaAll = new HashSet<CriterionBean>();
List<Criterion> listCriterion = evaluationManager.getCriterions(); List<Criterion> listCriterion = evaluationManager.getCriterions();

View File

@@ -295,4 +295,10 @@ public class SessionService {
Authentication newAuth = new UsernamePasswordAuthenticationToken(login,password); Authentication newAuth = new UsernamePasswordAuthenticationToken(login,password);
SecurityContextHolder.getContext().setAuthentication(newAuth); SecurityContextHolder.getContext().setAuthentication(newAuth);
} }
public void resetCurrentConference() {
WebUtils.setSessionAttribute(request, "currentConferenceId", null);
request.setAttribute("currentConference", null);
refreshAuthentication();
}
} }