示例#1
0
 /// <summary>
 /// Determines if given user has permission to complete given action on given form
 /// </summary>
 /// <param name="user">User which executes the action</param>
 /// <param name="FormName">Name of form on which is action called.</param>
 /// <param name="ActionName">Action which is called.</param>
 /// <returns>true - user has access to complete given action on given form | false - user has not access to execute given action on given form.</returns>
 public bool HasAccess(UserInfo user, String FormName, String ActionName)
 {
     foreach (Permission item in AppSettings.PermissionList)
     {
         if ((item.ActionName.Name == ActionName) && (item.FormName.Name == FormName))
             return true;
     }
     return false;
 }
示例#2
0
 public void Change(UserInfo item)
 {
     Change(item.ID, item.Nick, item.Password, item.Group);
 }