/// ----------------------------------------------------------------------------------------------- /// <summary> /// Constructor /// </summary> /// <param name="db">AccessEntities</param> /// ----------------------------------------------------------------------------------------------- public AccessUtils(AccessEntities db) { _db = db; _appId = AppCommon.AppAttributeValue; _isSysAdmin = HttpContext.Current.User.Identity.GetSysAdmin(); _accessRoutesFilter = "/Access/"; _systemAdminRouteFilter = "/SystemAdmin/"; var appid = AppCommon.AppAttributeValue; var userid = AppCommon.UserProfile.Id.ToString(); _areaGuids = _db.spUserAreas(appid, userid).Select(l => l.Id).ToList(); _roleGuids = _db.spUserRoles(appid, userid).Select(l => l.RoleId).ToList(); }