Пример #1
0
        public IEnumerable <MetricView> GetMetricViews(int companyId, DateTime?reportDate = null, LiteUser currentUser = null)
        {
            var results = _metricRepository.GetMetricViews(companyId, reportDate);

            if (results != null && currentUser != null && !currentUser.IsCompanyAdmin)
            {
                results = results.Where(m => m.AreaId.HasValue && currentUser.AccessibleAreaIds.Contains(m.AreaId.Value)).ToList();
            }
            return(results);
        }