1 2 package org.roller.presentation.tags.menu; 3 4 import org.apache.commons.logging.Log; 5 import org.apache.commons.logging.LogFactory; 6 import org.roller.presentation.RollerRequest; 7 8 import javax.servlet.http.HttpServletRequest ; 9 import javax.servlet.jsp.JspException ; 10 11 12 17 public class EditorNavigationBarTag extends MenuTag 18 { 19 private static Log mLogger = 20 LogFactory.getFactory().getInstance(EditorNavigationBarTag.class); 21 22 public EditorNavigationBarTag() 24 { 25 } 26 27 public String view() 29 { 30 return emit(); 31 } 32 33 public int doEndTag(java.io.PrintWriter pw) throws JspException 35 { 36 try 37 { 38 HttpServletRequest request = 39 (HttpServletRequest )pageContext.getRequest(); 40 RollerRequest rreq = RollerRequest.getRollerRequest(request); 41 42 if ( rreq.isUserAuthorizedToEdit() ) 43 { 44 return super.doEndTag(pw); 45 } 46 else 47 { 48 return EVAL_PAGE; 49 } 50 } 51 catch (Exception e) 52 { 53 mLogger.error("EditorNavigationBarTag exception",e); 54 throw new JspException (e); 55 } 56 } 57 } 58 59 | Popular Tags |