1 18 19 package org.apache.roller.ui.core.tags.menu; 20 21 import javax.servlet.http.HttpServletRequest ; 22 import javax.servlet.jsp.JspException ; 23 import org.apache.commons.logging.Log; 24 import org.apache.commons.logging.LogFactory; 25 import org.apache.roller.ui.core.RollerSession; 26 27 28 34 public class EditorNavigationBarTag extends MenuTag { 35 36 private static Log mLogger = LogFactory.getLog(EditorNavigationBarTag.class); 37 38 39 public String view() { 40 return emit(); 41 } 42 43 44 public int doEndTag(java.io.PrintWriter pw) throws JspException { 45 try { 46 HttpServletRequest request = 47 (HttpServletRequest )pageContext.getRequest(); 48 RollerSession rollerSession = RollerSession.getRollerSession(request); 49 if ( rollerSession.isGlobalAdminUser() ) { 50 return super.doEndTag(pw); 51 } else { 52 return EVAL_PAGE; 53 } 54 } catch (Exception e) { 55 mLogger.error("EditorNavigationBarTag exception",e); 56 throw new JspException (e); 57 } 58 } 59 60 } 61 | Popular Tags |