Package org.beangle.ems.security

Examples of org.beangle.ems.security.User


  public UserPropertyExtractor(TextResource textResource) {
    super(textResource);
  }

  public Object getPropertyValue(Object target, String property) throws Exception {
    User user = (User) target;
    if ("enabled".equals(property)) {
      boolean enabled = user.isEnabled();
      if (enabled) return getText("action.activate");
      else return getText("action.freeze");
    }
    if ("groups".equals(property)) {
      return getPropertyIn(user.getMembers(), "group.name");
    } else {
      return super.getPropertyValue(target, property);
    }
  }
View Full Code Here


  public String info() {
    String userName = get("user.name");
    if (StringUtils.isEmpty(userName)) { return null; }
    List<User> users = entityDao.get(User.class, "name", userName);
    if (!users.isEmpty()) {
      User user = users.get(0);
      put("user", StrUtils.concat(userName, "(", user.getFullname(), ")"));
    } else {
      put("user", userName);
    }
    Avatar avatar = avatarBase.getAvatar(userName);
    put("avatar", avatar);
View Full Code Here

  public String info() {
    String userName = get("user.name");
    if (StringUtils.isEmpty(userName)) { return null; }
    List<User> users = entityDao.get(User.class, "name", userName);
    if (!users.isEmpty()) {
      User user = users.get(0);
      put("user", StrUtils.concat(userName, "(", user.getFullname(), ")"));
    } else {
      put("user", userName);
    }
    Avatar avatar = avatarBase.getAvatar(userName);
    put("avatar", avatar);
View Full Code Here

TOP

Related Classes of org.beangle.ems.security.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.