public Result <BrokenExternalReferencesReport, OperationError> GetLatestReport() { var currentReportResult = _repository.LoadCurrentReport(); if (currentReportResult.IsNone) { return(new OperationError(OperationFailure.NotFound)); } var report = currentReportResult.Value; if (!_authorizationContext.HasPermission(new ViewBrokenExternalReferencesReportPermission(report))) { return(new OperationError(OperationFailure.Forbidden)); } return(report); }