public bool Authorize(DashboardContext context) { var httpContext = context.GetHttpContext(); return httpContext.User.IsInRole(GlobalConstants.AdministratorRoleName); } }