Esempio n. 1
0
        public IActionResult Get(string chartSet, int engagementId)
        {
            if (!_accessService.AllowGetRisk(User, engagementId) &&
                !_accessService.AllowGetVulnerability(User, engagementId) &&
                !_accessService.AllowGetHost(User, engagementId) &&
                !_accessService.AllowGetGovernanceControl(User, engagementId) &&
                !_accessService.AllowGetComplianceHipaa(User, engagementId) &&
                !_accessService.AllowGetEngagement(User, engagementId) &&
                !_accessService.AllowGetCustomer(User, engagementId) &&
                !_accessService.AllowGetImport(User, engagementId))
            {
                return(Ok(new Dashboard()));
            }

            Dashboard dashboard = _dashboardService.Get(chartSet, engagementId);

            if (dashboard == new Dashboard())
            {
                return(StatusCode(403));
            }
            else
            {
                return(Ok(dashboard));
            }
        }