Exemplo n.º 1
0
        public IEnumerable <SessionViewModel> Sessions(string username)
        {
            IEnumerable <SessionViewModel> sessions = _repo.ListAllSessions()
                                                      .Where(s => s.IsVisible == true)
                                                      .Select(s => new SessionViewModel()
            {
                DateCreated             = s.DateCreated,
                SessionName             = s.Name,
                Secured                 = !string.IsNullOrEmpty(s.HashedPassword),
                ConnectionExpiryInHours = s.ConnectionExpiryInHours,
                IsUserAuthorized        = _service.IsUserAuthorized(username, s.Name),
                IsVisible               = s.IsVisible,
                PersistHistory          = s.PersistHistory
            });

            return(sessions);
        }
Exemplo n.º 2
0
 public ActionResult Index()
 {
     return(View(_repo.ListAllSessions()));
 }