Exemplo n.º 1
0
 public static bool CheckPortalAuthorized(string userName, byte moduleId, int permisson)
 {
     UserAdmin objAdmin = new UserAdminDao().GetByUserName(userName);
     if (objAdmin != null)
     {
         AuthenticateDao auDao = new AuthenticateDao();
         ArrayList permissionIds = new ArrayList();
         permissionIds.Add(permisson);
         return auDao.CheckPermission(objAdmin.UserAdminId, moduleId, Array.ConvertAll(permissionIds.ToArray(), arr => (int)arr));
     }
     return false;
 }
Exemplo n.º 2
0
 public static bool IsUserAuthorized(int userId, byte moduleId, int[] permissionIds)
 {
     AuthenticateDao auDao = new AuthenticateDao();
     return auDao.CheckPermission(userId, moduleId, Array.ConvertAll(permissionIds.ToArray(), arr => (int)arr));
 }
Exemplo n.º 3
0
 public static bool CheckAuthorized(int userId, byte moduleId, int permisson)
 {
     AuthenticateDao auDao = new AuthenticateDao();
     ArrayList permissionIds = new ArrayList();
     permissionIds.Add(permisson);
     return auDao.CheckPermission(userId, moduleId, Array.ConvertAll(permissionIds.ToArray(), arr => (int)arr));
 }