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