Exemplo n.º 1
0
 public SecurityContext(User user
         , Dictionary<string, string> userRoles
         , Dictionary<string, string> userAreas)
 {
     _user = user;
         _userRoles = userRoles;
         _userAreas = userAreas;
 }
Exemplo n.º 2
0
        public static User GetCurrentUser()
        {
            User currentUser = null;

            if(HttpContext.Current.User.Identity.IsAuthenticated)
                currentUser = new User(HttpContext.Current.User.Identity.Name);

            return currentUser;
        }