1 5 6 package com.quikj.application.communicator.applications.webtalk.controller; 7 8 import com.quikj.application.communicator.admin.model.*; 9 import javax.servlet.http.*; 10 import org.apache.struts.action.*; 11 12 import java.sql.*; 13 14 18 public class DisplayGroupWizardIntroAction extends Action 19 { 20 21 22 public DisplayGroupWizardIntroAction() 23 { 24 } 25 26 public ActionForward execute(ActionMapping mapping, 27 ActionForm form, 28 HttpServletRequest request, 29 HttpServletResponse response) 30 { 31 ActionErrors errors = new ActionErrors(); 32 33 Connection c = (Connection)request.getSession().getAttribute("connection"); 34 if (c == null) 35 { 36 errors.add(ActionErrors.GLOBAL_ERROR, new ActionError("error.not.logged.in")); 37 saveErrors(request, errors); 38 39 return mapping.findForward("logon"); 40 } 41 42 AccountElement element = (AccountElement)request.getSession().getAttribute("userInfo"); 43 if (element.isAdminLevel() == false) 44 { 45 errors.add(ActionErrors.GLOBAL_ERROR, 46 new ActionError("error.insufficient.privilege")); 47 saveErrors(request, errors); 48 49 return mapping.findForward("main_menu"); 50 } 51 52 WebTalkRelatedTasks menu = new WebTalkRelatedTasks(); 54 request.setAttribute("menu", menu); 55 56 return mapping.getInputForward(); 57 } 58 } 59 | Popular Tags |