Package com.jeecms.cms.entity.main

Examples of com.jeecms.cms.entity.main.CmsUser


  public String edit(Integer id, Integer queryGroupId, Boolean queryDisabled,
      HttpServletRequest request, ModelMap model) {
    String queryUsername = RequestUtils.getQueryParam(request,
        "queryUsername");
    String queryEmail = RequestUtils.getQueryParam(request, "queryEmail");
    CmsUser currUser = CmsUtils.getUser(request);
    WebErrors errors = validateEdit(id, request);
    if (errors.hasErrors()) {
      return errors.showErrorPage(model);
    }
    CmsUser admin = manager.findById(id);

    List<CmsGroup> groupList = cmsGroupMng.getList();
    List<CmsSite> siteList = cmsSiteMng.getList();
    List<CmsRole> roleList = cmsRoleMng.getList();

    model.addAttribute("cmsAdmin", admin);
    model.addAttribute("siteIds", admin.getSiteIds());
    model.addAttribute("roleIds", admin.getRoleIds());
    model.addAttribute("groupList", groupList);
    model.addAttribute("siteList", siteList);
    model.addAttribute("roleList", roleList);
    model.addAttribute("currRank", currUser.getRank());
View Full Code Here


  private boolean vldExist(Integer id, WebErrors errors) {
    if (errors.ifNull(id, "id")) {
      return true;
    }
    CmsUser entity = manager.findById(id);
    if (errors.ifNotExist(entity, CmsUser.class, id)) {
      return true;
    }
    return false;
  }
View Full Code Here

    return false;
  }
 
  private boolean vldParams(Integer id, HttpServletRequest request,
      WebErrors errors) {
    CmsUser entity = manager.findById(id);
    CmsUser user = CmsUtils.getUser(request);
    if (entity.getRank() > user.getRank()) {
      errors.addErrorCode("error.noPermission", CmsUser.class, id);
      return true;
    }
    return false;
  }
View Full Code Here

      Integer reviewerId, Integer authorId, Date beginDate, Date endDate,
      CmsWorkLoadStatisticGroup group, CmsWorkLoadStatisticDateKind kind) {
    Long count;
    CmsWorkLoadStatistic bean;
    Channel channel = null;
    CmsUser author = null;
    CmsUser reviewer = null;
    Date begin = beginDate;
    Date end = null;
    int add = 1;
    if (channelId != null) {
      channel = channelMng.findById(channelId);
View Full Code Here

    WebErrors errors = validateView(id, request);
    if (errors.hasErrors()) {
      return errors.showErrorPage(model);
    }
    CmsSite site = CmsUtils.getSite(request);
    CmsUser user = CmsUtils.getUser(request);
    byte currStep = user.getCheckStep(site.getId());
    Content content = manager.findById(id);

    model.addAttribute("content", content);
    model.addAttribute("currStep", currStep);
View Full Code Here

    if (errors.hasErrors()) {
      return errors.showErrorPage(model);
    }
    CmsSite site = CmsUtils.getSite(request);
    Integer siteId = site.getId();
    CmsUser user = CmsUtils.getUser(request);
    // 内容
    Content content = manager.findById(id);
    // 栏目
    Channel channel = content.getChannel();
    // 模型
    CmsModel m = channel.getModel();
    // 模型项列表
    List<CmsModelItem> itemList = cmsModelItemMng.getList(m.getId(), false,
        false);
    // 栏目列表
    Set<Channel> rights;
    if (user.getUserSite(siteId).getAllChannel()) {
      // 拥有所有栏目权限
      rights = null;
    } else {
      rights = user.getChannels(siteId);
    }

    List<Channel> topList = channelMng.getTopList(site.getId(), true);
    List<Channel> channelList = Channel.getListForSelect(topList, rights,
        true);
View Full Code Here

    if (errors.hasErrors()) {
      return errors.showErrorPage(model);
    }
    // 加上模板前缀
    CmsSite site = CmsUtils.getSite(request);
    CmsUser user = CmsUtils.getUser(request);
    String tplPath = site.getTplPath();
    if (!StringUtils.isBlank(ext.getTplContent())) {
      ext.setTplContent(tplPath + ext.getTplContent());
    }
    bean.setAttr(RequestUtils.getRequestMap(request, "attr_"));
View Full Code Here

    if (errors.hasErrors()) {
      return errors.showErrorPage(model);
    }
    // 加上模板前缀
    CmsSite site = CmsUtils.getSite(request);
    CmsUser user = CmsUtils.getUser(request);
    String tplPath = site.getTplPath();
    if (!StringUtils.isBlank(ext.getTplContent())) {
      ext.setTplContent(tplPath + ext.getTplContent());
    }
    String[] tagArr = StrUtils.splitAndTrim(tagStr, ",", MessageResolver
View Full Code Here

      HttpServletRequest request, ModelMap model) {
    WebErrors errors = validateCheck(ids, request);
    if (errors.hasErrors()) {
      return errors.showErrorPage(model);
    }
    CmsUser user = CmsUtils.getUser(request);
    Content[] beans = manager.check(ids, user);
    for (Content bean : beans) {
      log.info("check Content id={}", bean.getId());
    }
    return list(queryStatus, queryTypeId, queryTopLevel, queryRecommend,
View Full Code Here

      ModelMap model) {
    WebErrors errors = validateReject(ids, request);
    if (errors.hasErrors()) {
      return errors.showErrorPage(model);
    }
    CmsUser user = CmsUtils.getUser(request);
    Content[] beans = manager.reject(ids, user, rejectStep, rejectOpinion);
    for (Content bean : beans) {
      log.info("reject Content id={}", bean.getId());
    }
    return list(queryStatus, queryTypeId, queryTopLevel, queryRecommend,
View Full Code Here

TOP

Related Classes of com.jeecms.cms.entity.main.CmsUser

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.