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; }
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)); }
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)); }