Package org.j2cms.model.user

Examples of org.j2cms.model.user.User


public class ManageChannelFilter implements Filter {
  public void doFilter(ServletRequest req, ServletResponse res,
      FilterChain filterChain) throws IOException, ServletException {
    HttpServletRequest request = (HttpServletRequest) req;
    User user = WebUtil.getUser(request);
    if (user.getGroup()==null||user.getGroup().getManageChannel()!= true) {
      HttpServletResponse response = (HttpServletResponse) res;
      String ctp=request.getSession().getServletContext().getContextPath();
      response.sendRedirect(ctp+"/util/403");
      return;
    }
View Full Code Here


*/
public class AdminLoginValidateFilter implements Filter {
  public void doFilter(ServletRequest req, ServletResponse res,
      FilterChain filterChain) throws IOException, ServletException {
    HttpServletRequest request = (HttpServletRequest) req;
    User user = WebUtil.getUser(request);
    if (user == null) {
      HttpServletResponse response = (HttpServletResponse) res;
      String ctp=request.getSession().getServletContext().getContextPath();//.getServletContext().getContextPath();
      response.sendRedirect(ctp+"/login");
      return;
View Full Code Here

public class ManageUserFilter implements Filter {
  public void doFilter(ServletRequest req, ServletResponse res,
      FilterChain filterChain) throws IOException, ServletException {
    HttpServletRequest request = (HttpServletRequest) req;
    User user = WebUtil.getUser(request);
    if (user.getGroup()==null||user.getGroup().getManageUser()!= true) {
      HttpServletResponse response = (HttpServletResponse) res;
      String ctp=request.getSession().getServletContext().getContextPath();
      response.sendRedirect(ctp+"/util/403");
      return;
    }
View Full Code Here

public class ManageGroupFilter implements Filter {

  public void doFilter(ServletRequest req, ServletResponse res,
      FilterChain filterChain) throws IOException, ServletException {
    HttpServletRequest request = (HttpServletRequest) req;
    User user = WebUtil.getUser(request);
    if (user.getGroup()==null||user.getGroup().getManageGroup()!= true) {
      HttpServletResponse response = (HttpServletResponse) res;
      String ctp=request.getSession().getServletContext().getContextPath();
      response.sendRedirect(ctp+"/util/403");
      return;
    }
View Full Code Here

*/
public class ManageCommentFilter implements Filter {
  public void doFilter(ServletRequest req, ServletResponse res,
      FilterChain filterChain) throws IOException, ServletException {
    HttpServletRequest request = (HttpServletRequest) req;
    User user = WebUtil.getUser(request);
    if (user.getGroup()==null||user.getGroup().getManageComment()!= true) {
      HttpServletResponse response = (HttpServletResponse) res;
      String ctp=request.getSession().getServletContext().getContextPath();
      response.sendRedirect(ctp+"/util/403");
      return;
    }
View Full Code Here

public class ManageLogFilter implements Filter {
  public void doFilter(ServletRequest req, ServletResponse res,
      FilterChain filterChain) throws IOException, ServletException {
    HttpServletRequest request = (HttpServletRequest) req;
    User user = WebUtil.getUser(request);
    if (user.getGroup()==null||user.getGroup().getManageLog() != true) {
      HttpServletResponse response = (HttpServletResponse) res;
      String ctp=request.getSession().getServletContext().getContextPath();
      response.sendRedirect(ctp+"/util/403");
      return;
    }
View Full Code Here

public class ManageArticalFilter implements Filter {
  public void doFilter(ServletRequest req, ServletResponse res,
      FilterChain filterChain) throws IOException, ServletException {
    HttpServletRequest request = (HttpServletRequest) req;
    User user = WebUtil.getUser(request);
    if (user.getGroup()==null||true!=user.getGroup().getManageArticle()) {
      HttpServletResponse response = (HttpServletResponse) res;
      String ctp=request.getSession().getServletContext().getContextPath();
      response.sendRedirect(ctp+"/util/403");
      return;
    }
View Full Code Here

public class ManageConfigFilter implements Filter {
  public void doFilter(ServletRequest req, ServletResponse res,
      FilterChain filterChain) throws IOException, ServletException {
    HttpServletRequest request = (HttpServletRequest) req;
    User user = WebUtil.getUser(request);
    if (user.getGroup()==null||user.getGroup().getManageConfig()!= true) {
      HttpServletResponse response = (HttpServletResponse) res;
      String ctp=request.getSession().getServletContext().getContextPath();
      response.sendRedirect(ctp+"/util/403");
      return;
    }
View Full Code Here

  @Actions({
    @Action("save")
  })
  public String save(){
    this.entity.setArticle (new Article(articleID));
    this.entity.setUser(new User(userID));
    entityService.save(this.entity);
    return SUCCESS;
  }
View Full Code Here

    @Action("update")
  })
  public String update(){
    try {
      if(!checkEntityForm()) return "edit";
      User user = setEntityToUser(userService.find(entity.getId()));
      this.userService.update(user);
      return "toList";
    } catch (Exception e) {
      e.printStackTrace();
      return ERROR;
View Full Code Here

TOP

Related Classes of org.j2cms.model.user.User

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.