Beispiel #1
0
        /// <summary>
        /// GEt all user
        /// </summary>
        /// <returns>List of User</returns>
        public List <User> GetAllUsersByTeam(User currentUser)
        {
            if (currentUser.IsAdministrator && !currentUser.TeamId.HasValue)
            {
                return(UserDataAccesor.GetAllUsers());
            }

            return(currentUser.TeamId.HasValue
                              ? UserDataAccesor.GetAllUsersForTeam(currentUser.TeamId.Value)
                              : new List <User>());
        }