Пример #1
0
        public void OnAuthorization(AuthorizationContext filterContext)
        {
            var user = _authentication.CurrentUser() ?? new UserToken()
            {
                Admin         = false,
                Authenticated = false
            };

            filterContext.Controller.ViewBag.User = user;
        }