Skip to content

Commit

Permalink
Fix concept set permission checking
Browse files Browse the repository at this point in the history
  • Loading branch information
tjennison-work committed Jul 21, 2023
1 parent 1b5fbc7 commit c57f910
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public ResponseEntity<Void> deleteConceptSet(String studyId, String conceptSetId
accessControlService.throwIfUnauthorized(
SpringAuthentication.getCurrentUser(),
Permissions.forActions(CONCEPT_SET, DELETE),
ResourceId.forCohort(studyId, conceptSetId));
ResourceId.forConceptSet(studyId, conceptSetId));
conceptSetService.deleteConceptSet(studyId, conceptSetId);
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
Expand All @@ -70,7 +70,7 @@ public ResponseEntity<ApiConceptSetV2> getConceptSet(String studyId, String conc
accessControlService.throwIfUnauthorized(
SpringAuthentication.getCurrentUser(),
Permissions.forActions(CONCEPT_SET, READ),
ResourceId.forCohort(studyId, conceptSetId));
ResourceId.forConceptSet(studyId, conceptSetId));
return ResponseEntity.ok(toApiObject(conceptSetService.getConceptSet(studyId, conceptSetId)));
}

Expand All @@ -96,7 +96,7 @@ public ResponseEntity<ApiConceptSetV2> updateConceptSet(
accessControlService.throwIfUnauthorized(
SpringAuthentication.getCurrentUser(),
Permissions.forActions(CONCEPT_SET, UPDATE),
ResourceId.forCohort(studyId, conceptSetId));
ResourceId.forConceptSet(studyId, conceptSetId));
Criteria singleCriteria =
body.getCriteria() == null
? null
Expand Down

0 comments on commit c57f910

Please sign in to comment.