public PartialViewResult Info()
        {
            var vm = new AuthenticationStatusViewModel();

            vm.IsAuthenticated = HttpContext.User.Identity.IsAuthenticated;
            vm.Authorization   = _authService.GetAllowedOperations(AuthOperations.AdminDashboard.View);
            vm.ReturnUrl       = GetReturnUrl();
            if (vm.IsAuthenticated)
            {
                vm.UserName = HttpContext.User.Identity.GetUserName();
            }

            return(PartialView("Info", vm));
        }
Exemplo n.º 2
0
 public ShellViewModel()
 {
     Login = new LoginViewModel();
       AuthenticationStatus = new AuthenticationStatusViewModel();
       Services.EventAggregator.Publish(new Events.AuthenticationChangedEventMessage());
 }