Example #1
0
  private List<UserRole> getUserRoles() {
    List<UserRole> roles = userService.getUserRoles();

    roles.remove(UserRole.PROJECTMANAGER);

    User user = EhourWebSession.getUser();

    if (!SecurityRules.isAdmin(user)) {
      roles.remove(UserRole.ADMIN);
    }

    if (!EhourWebSession.getEhourConfig().isSplitAdminRole()) {
      roles.remove(UserRole.MANAGER);
    }

    return roles;
  }
Example #2
0
  /**
   * Get the roles of the logged in user
   *
   * @return
   */
  public static Roles getRoles() {
    EhourWebSession session = EhourWebSession.getSession();

    return session.getRoles();
  }
Example #3
0
 public ExportMonthSelectionPage() {
   this(EhourWebSession.getSession().getNavCalendar());
 }
Example #4
0
  public static User getUser() {
    EhourWebSession session = EhourWebSession.getSession();

    return (session.getAuthUser() != null) ? session.getAuthUser().getUser() : null;
  }
Example #5
0
 public static User getUser() {
   EhourWebSession session = EhourWebSession.getSession();
   AuthUser authUser = session.getAuthUser();
   return (authUser != null) ? authUser.getUser() : null;
 }
Example #6
0
 public static EhourConfig getEhourConfig() {
   return EhourWebSession.getSession().ehourConfig;
 }
Example #7
0
 protected EhourConfig getConfig() {
   return EhourWebSession.getEhourConfig();
 }
Example #8
0
 protected final EhourWebSession getEhourWebSession() {
   return EhourWebSession.getSession();
 }