diff --git a/src/main/java/org/ohdsi/webapi/service/EvidenceService.java b/src/main/java/org/ohdsi/webapi/service/EvidenceService.java index 8f6641804..8dda86f25 100644 --- a/src/main/java/org/ohdsi/webapi/service/EvidenceService.java +++ b/src/main/java/org/ohdsi/webapi/service/EvidenceService.java @@ -147,7 +147,6 @@ public String getSourceIds() { * @param cohortId The cohort Id * @return A list of studies related to the cohort */ - @PreAuthorize("isAnyPermitted(anyOf('read:source','write:source'))") @GetMapping(value = "/study/{cohortId}", produces = MediaType.APPLICATION_JSON_VALUE) public Collection getCohortStudyMapping(@PathVariable("cohortId") int cohortId) { return cohortStudyMappingRepository.findByCohortDefinitionId(cohortId); @@ -162,7 +161,6 @@ public Collection getCohortStudyMapping(@PathVariable("cohor * @param conceptId The concept Id of interest * @return A list of cohorts for the specified conceptId */ - @PreAuthorize("isAnyPermitted(anyOf('read:source','write:source'))") @GetMapping(value = "/mapping/{conceptId}", produces = MediaType.APPLICATION_JSON_VALUE) public Collection getConceptCohortMapping(@PathVariable("conceptId") int conceptId) { return mappingRepository.findByConceptId(conceptId); @@ -179,7 +177,6 @@ public Collection getConceptCohortMapping(@PathVariable("c * @param conceptId The conceptId of interest * @return A list of concepts based on the conceptId of interest */ - @PreAuthorize("isAnyPermitted(anyOf('read:source','write:source'))") @GetMapping(value = "/conceptofinterest/{conceptId}", produces = MediaType.APPLICATION_JSON_VALUE) public Collection getConceptOfInterest(@PathVariable("conceptId") int conceptId) { return conceptOfInterestMappingRepository.findAllByConceptId(conceptId); @@ -197,7 +194,6 @@ public Collection getConceptOfInterest(@PathVariable(" * @param setid The drug label setId * @return The set of drug labels that match the setId specified. */ - @PreAuthorize("isAnyPermitted(anyOf('read:source','write:source'))") @GetMapping(value = "/label/{setid}", produces = MediaType.APPLICATION_JSON_VALUE) public Collection getDrugLabel(@PathVariable("setid") String setid) { return drugLabelRepository.findAllBySetid(setid); @@ -212,7 +208,6 @@ public Collection getDrugLabel(@PathVariable("setid") String setid) { * @param searchTerm The search term * @return A list of drug labels matching the search term */ - @PreAuthorize("isAnyPermitted(anyOf('read:source','write:source'))") @GetMapping(value = "/labelsearch/{searchTerm}", produces = MediaType.APPLICATION_JSON_VALUE) public Collection searchDrugLabels(@PathVariable("searchTerm") String searchTerm) { return drugLabelRepository.searchNameContainsTerm(searchTerm); diff --git a/src/main/java/org/ohdsi/webapi/service/VocabularyService.java b/src/main/java/org/ohdsi/webapi/service/VocabularyService.java index a78328d26..03e64d9bb 100644 --- a/src/main/java/org/ohdsi/webapi/service/VocabularyService.java +++ b/src/main/java/org/ohdsi/webapi/service/VocabularyService.java @@ -326,7 +326,6 @@ protected PreparedStatementRenderer prepareExecuteIdentifierLookup(long[] identi * @param identifiers an array of concept identifiers * @return A collection of concepts */ - @PreAuthorize("isAnyPermitted(anyOf('read:source','write:source'))") @PostMapping(value = "/lookup/identifiers", produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) @@ -396,7 +395,6 @@ protected PreparedStatementRenderer prepareExecuteSourcecodeLookup(String[] sour * @param sourcecodes array of source codes * @return A collection of concepts */ - @PreAuthorize("isAnyPermitted(anyOf('read:source','write:source'))") @PostMapping(value = "/lookup/sourcecodes", produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) @@ -471,7 +469,6 @@ protected PreparedStatementRenderer prepareExecuteMappedLookup(long[] identifier * @param identifiers an array of concept identifiers * @return A collection of concepts */ - @PreAuthorize("isAnyPermitted(anyOf('read:source','write:source'))") @PostMapping(value = "/lookup/mapped", produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) @@ -668,7 +665,6 @@ protected PreparedStatementRenderer prepareExecuteSearch(ConceptSearch search, S * @param search The ConceptSearch parameters * @return A collection of concepts */ - @PreAuthorize("isAnyPermitted(anyOf('read:source','write:source'))") @PostMapping(value = "/search", produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) @@ -755,7 +751,6 @@ public PreparedStatementRenderer prepareExecuteSearchWithQuery(String query, Sou * @param query The query to use to search for concepts * @return A collection of concepts */ - @PreAuthorize("isAnyPermitted(anyOf('read:source','write:source'))") @GetMapping(value = "/search/{query}", produces = MediaType.APPLICATION_JSON_VALUE) public Collection executeSearch(@PathVariable("query") String query) { @@ -807,7 +802,6 @@ public Concept getConcept( * @param id The concept ID to find * @return The concept details */ - @PreAuthorize("isAnyPermitted(anyOf('read:source','write:source'))") @GetMapping(value = "/concept/{id}", produces = MediaType.APPLICATION_JSON_VALUE) public Concept getConcept(@PathVariable("id") final long id) { @@ -959,7 +953,6 @@ public Collection getConceptAncestorAndDescendant( * @param id The concept identifier * @return A collection of related concepts */ - @PreAuthorize("isAnyPermitted(anyOf('read:source','write:source'))") @GetMapping(value = "/concept/{id}/related", produces = MediaType.APPLICATION_JSON_VALUE) public Collection getRelatedConcepts(@PathVariable("id") final Long id) { @@ -1020,7 +1013,6 @@ protected PreparedStatementRenderer prepareGetCommonAncestors(Object[] identifie * @param identifiers An array of concept identifiers * @return A collection of related concepts */ - @PreAuthorize("isAnyPermitted(anyOf('read:source','write:source'))") @PostMapping(value = "/commonAncestors", produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) @@ -1070,7 +1062,6 @@ public void processRow(ResultSet rs) throws SQLException { * @param conceptSetExpression A concept set expression * @return A collection of concept identifiers */ - @PreAuthorize("isAnyPermitted(anyOf('read:source','write:source'))") @PostMapping(value = "/resolveConceptSetExpression", produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) @@ -1185,7 +1176,6 @@ public Void mapRow(ResultSet resultSet, int arg1) throws SQLException { * @param id The concept identifier * @return A collection of concepts */ - @PreAuthorize("isAnyPermitted(anyOf('read:source','write:source'))") @GetMapping(value = "/concept/{id}/descendants", produces = MediaType.APPLICATION_JSON_VALUE) public Collection getDescendantConcepts(@PathVariable("id") final Long id) { @@ -1233,7 +1223,6 @@ public Domain mapRow(final ResultSet resultSet, final int arg1) throws SQLExcept * @summary Get domains (default vocabulary) * @return A collection of domains */ - @PreAuthorize("isAnyPermitted(anyOf('read:source','write:source'))") @GetMapping(value = "/domains", produces = MediaType.APPLICATION_JSON_VALUE) public Collection getDomains() { @@ -1283,7 +1272,6 @@ public Vocabulary mapRow(final ResultSet resultSet, final int arg1) throws SQLEx * @summary Get vocabularies (default vocabulary) * @return A collection of vocabularies */ - @PreAuthorize("isAnyPermitted(anyOf('read:source','write:source'))") @GetMapping(value = "/vocabularies", produces = MediaType.APPLICATION_JSON_VALUE) public Collection getVocabularies() { @@ -1418,7 +1406,6 @@ protected PreparedStatementRenderer prepareGetDescendantOfAncestorConcepts(Desce * @param search The descendant of ancestor search object * @return A collection of concepts */ - @PreAuthorize("isAnyPermitted(anyOf('read:source','write:source'))") @PostMapping(value = "/descendantofancestor", produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) @@ -1485,7 +1472,6 @@ protected PreparedStatementRenderer prepareGetRelatedConcepts(RelatedConceptSear * @param search The concept identifiers of interest * @return A collection of concepts */ - @PreAuthorize("isAnyPermitted(anyOf('read:source','write:source'))") @PostMapping(value = "/relatedconcepts", produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) @@ -1535,7 +1521,6 @@ public Void mapRow(ResultSet resultSet, int arg1) throws SQLException { * @param conceptList The list of concept identifiers * @return A collection of concepts */ - @PreAuthorize("isAnyPermitted(anyOf('read:source','write:source'))") @PostMapping(value = "/conceptlist/descendants", produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) @@ -1697,7 +1682,6 @@ public Collection compareConceptSetsCsv( * @param conceptSetExpressionList Expects a list of exactly 2 concept set expressions * @return A collection of concept set comparisons */ - @PreAuthorize("isAnyPermitted(anyOf('read:source','write:source'))") @PostMapping(value = "/compare", produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)