Ejemplo n.º 1
0
 /// <summary>
 /// Creates user context from <paramref name="account"/>.
 /// </summary>
 /// <param name="account">User account.</param>
 public UserContext(UserAccount account)
 {
     if (account == null)
     {
         Account = new UserAccount
         {
             Fullname = "Anonymous"
         };
         isAuthenticated = false;
     }
     else
     {
         Account = account;
         isAuthenticated = true;
     }
 }
Ejemplo n.º 2
0
 public static bool IsSuperAdmin(UserAccount account)
 {
     return account.LocalCredentials != null && account.LocalCredentials.Username == FormsCore.AdminUsername;
 }