Package net.sourceforge.pebble.domain

Examples of net.sourceforge.pebble.domain.AbstractBlog


   * @return  an integer specifying what to do afterwards
   * @throws  javax.servlet.jsp.JspException    if something goes wrong
   */
  public int doStartTag() throws JspException {
    HttpServletRequest request = (HttpServletRequest)pageContext.getRequest();
    AbstractBlog abstractBlog = (AbstractBlog)request.getAttribute(Constants.BLOG_KEY);

    if (abstractBlog instanceof Blog) {
      Blog blog = (Blog)abstractBlog;
      if (SecurityUtils.isUserAuthorisedForBlog(blog)) {
        return EVAL_BODY_INCLUDE;
View Full Code Here


   * @return  an integer specifying what to do afterwards
   * @throws  javax.servlet.jsp.JspException    if something goes wrong
   */
  public int doStartTag() throws JspException {
    HttpServletRequest request = (HttpServletRequest)pageContext.getRequest();
    AbstractBlog abstractBlog = (AbstractBlog)request.getAttribute(Constants.BLOG_KEY);

    if (abstractBlog instanceof Blog) {
      Blog blog = (Blog)abstractBlog;
      if (SecurityUtils.isBlogAdmin() || SecurityUtils.isUserAuthorisedForBlogAsBlogOwner(blog)) {
        return EVAL_BODY_INCLUDE;
View Full Code Here

  }

  private boolean validateSignedRequest(HttpServletRequest request) {
    String requestHash = request.getParameter(PEBBLE_SECURITY_SIGNATURE_PARAMETER);
    if (requestHash != null) {
      AbstractBlog blog = (AbstractBlog) request.getAttribute(Constants.BLOG_KEY);
      if (blog instanceof Blog) {
        String salt = ((Blog) blog).getXsrfSigningSalt();
        // Convert request parameters to map
        String servletPath = request.getServletPath();
        if (servletPath.startsWith("/")) {
View Full Code Here

    try {
      response.sendError(HttpServletResponse.SC_NOT_FOUND);
    } catch (IOException ioe) {
      throw new ServletException(ioe);
    } finally {
      AbstractBlog blog = (AbstractBlog)getModel().get(Constants.BLOG_KEY);
      blog.log(request, HttpServletResponse.SC_NOT_FOUND);
    }
  }
View Full Code Here

   * @return  an integer specifying what to do afterwards
   * @throws  javax.servlet.jsp.JspException    if something goes wrong
   */
  public int doStartTag() throws JspException {
    HttpServletRequest request = (HttpServletRequest)pageContext.getRequest();
    AbstractBlog abstractBlog = (AbstractBlog)request.getAttribute(Constants.BLOG_KEY);

    if (abstractBlog instanceof Blog) {
      Blog blog = (Blog)abstractBlog;
      if (SecurityUtils.isUserAuthorisedForBlogAsBlogPublisher(blog)) {
        return EVAL_BODY_INCLUDE;
View Full Code Here

      RequestDispatcher dispatcher = context.getRequestDispatcher(getUri());
      dispatcher.include(request, response);
    } catch (IOException ioe) {
      throw new ServletException(ioe);
    } finally {
      AbstractBlog blog = (AbstractBlog)getModel().get(Constants.BLOG_KEY);
      blog.log(request, HttpServletResponse.SC_OK);
    }
  }
View Full Code Here

   * @param context  the ServletContext instance
   */
  public void dispatch(HttpServletRequest request, HttpServletResponse response, ServletContext context) throws ServletException {
    response.setStatus(HttpServletResponse.SC_NOT_MODIFIED);

    AbstractBlog blog = (AbstractBlog)getModel().get(Constants.BLOG_KEY);
    blog.log(request, HttpServletResponse.SC_NOT_MODIFIED);
  }
View Full Code Here

      RequestDispatcher dispatcher = context.getRequestDispatcher(getUri());
      dispatcher.include(request, response);
    } catch (IOException ioe) {
      throw new ServletException(ioe);
    } finally {
      AbstractBlog blog = (AbstractBlog)getModel().get(Constants.BLOG_KEY);
      blog.log(request, HttpServletResponse.SC_OK);
    }
  }
View Full Code Here

  }

  @Override
  public View process(HttpServletRequest request, HttpServletResponse response) throws ServletException {
    PebbleUserDetails userDetails = SecurityUtils.getUserDetails();
    AbstractBlog blog = (AbstractBlog)getModel().get(Constants.BLOG_KEY);

    String openId = request.getParameter("openid");
    try {
      PebbleContext.getInstance().getConfiguration().getSecurityRealm().removeOpenIdFromUser(userDetails, openId);
    } catch (SecurityRealmException sre) {
      throw new ServletException(sre);
    }
    return new RedirectView(blog.getUrl() + "/editUserPreferences.secureaction");
  }
View Full Code Here

   * @return  an integer specifying what to do afterwards
   * @throws  JspException    if something goes wrong
   */
  public int doStartTag() throws JspException {
    HttpServletRequest request = (HttpServletRequest)pageContext.getRequest();
    AbstractBlog abstractBlog = (AbstractBlog)request.getAttribute(Constants.BLOG_KEY);

    if (abstractBlog instanceof Blog) {
      Blog blog = (Blog)abstractBlog;
      if (SecurityUtils.isUserAuthorisedForBlogAsBlogContributor(blog)) {
        return EVAL_BODY_INCLUDE;
View Full Code Here

TOP

Related Classes of net.sourceforge.pebble.domain.AbstractBlog

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.