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; }
/** * Get the roles of the logged in user * * @return */ public static Roles getRoles() { EhourWebSession session = EhourWebSession.getSession(); return session.getRoles(); }
public ExportMonthSelectionPage() { this(EhourWebSession.getSession().getNavCalendar()); }
public static User getUser() { EhourWebSession session = EhourWebSession.getSession(); return (session.getAuthUser() != null) ? session.getAuthUser().getUser() : null; }
public static User getUser() { EhourWebSession session = EhourWebSession.getSession(); AuthUser authUser = session.getAuthUser(); return (authUser != null) ? authUser.getUser() : null; }
public static EhourConfig getEhourConfig() { return EhourWebSession.getSession().ehourConfig; }
protected EhourConfig getConfig() { return EhourWebSession.getEhourConfig(); }
protected final EhourWebSession getEhourWebSession() { return EhourWebSession.getSession(); }