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

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

View File

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