Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ public CohortDTO saveCohortDefinition(@PathVariable("id") final int id, @Request
@GetMapping(value = "/{id}/generate/{sourceKey}", produces = MediaType.APPLICATION_JSON_VALUE)
@PreAuthorize("""
(isOwner(#id, COHORT_DEFINITION) or isPermitted('write:cohort-definition') or isPermitted('read:cohort-definition') or hasEntityAccess(#id, COHORT_DEFINITION, READ))
and (isPermitted('read:write') or hasSourceAccess(#sourceKey, WRITE)
and (isPermitted('write:source') or hasSourceAccess(#sourceKey, WRITE))
""")
public JobExecutionResource generateCohort(@PathVariable("id") final int id,
@PathVariable("sourceKey") final String sourceKey,
Expand Down Expand Up @@ -667,8 +667,8 @@ public JobExecutionResource generateCohort(@PathVariable("id") final int id,
@GetMapping(value = "/{id}/cancel/{sourceKey}", produces = MediaType.APPLICATION_JSON_VALUE)
@PreAuthorize("""
(isOwner(#id, COHORT_DEFINITION) or isPermitted('write:cohort-definition') or isPermitted('read:cohort-definition') or hasEntityAccess(#id, COHORT_DEFINITION, READ))
and (isPermitted('write:source') or hasSourceAccess(#sourceKey, WRITE)
""")
and (isPermitted('write:source') or hasSourceAccess(#sourceKey, WRITE))
""")
public ResponseEntity cancelGenerateCohort(@PathVariable("id") final int id, @PathVariable("sourceKey") final String sourceKey) {

final Source source = Optional.ofNullable(getSourceRepository().findBySourceKey(sourceKey))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -978,7 +978,7 @@ or hasEntityAccess(#copyAnnotationsRequest.sourceConceptSetId, CONCEPT_SET, READ
(
isPermitted('write:conceptset')
or isOwner(#copyAnnotationsRequest.targetConceptSetId, CONCEPT_SET)
or hasEntityAccess(#copyAnnotationsRequest.targetConceptSetId, CONCEPT_SET, WRITE))"
or hasEntityAccess(#copyAnnotationsRequest.targetConceptSetId, CONCEPT_SET, WRITE)
)
""")
public void copyAnnotations(@RequestBody CopyAnnotationsRequest copyAnnotationsRequest) {
Expand Down
Loading