Exemple #1
0
 /// <summary>
 /// 根据用户编号构造
 /// </summary>
 public AccountsPrincipal(int userID)
 {
     identity         = new SiteIdentity(userID);
     permissionList   = dataUser.GetEffectivePermissionList(userID);
     permissionListid = dataUser.GetEffectivePermissionListID(userID);
     roleList         = dataUser.GetUserRoles(userID);
 }
Exemple #2
0
 public AccountsPrincipal(string userName)
 {
     Data.User user = new Data.User(PubConstant.ConnectionString);
     this.identity         = new SiteIdentity(userName);
     this.permissionList   = user.GetEffectivePermissionList(((SiteIdentity)this.identity).UserID);
     this.permissionListid = user.GetEffectivePermissionListID(((SiteIdentity)this.identity).UserID);
     this.roleList         = user.GetUserRoles(((SiteIdentity)this.identity).UserID);
 }