use of com.nike.cerberus.security.PrincipalHasWritePermsForPath in project cerberus by Nike-Inc.
the class SecureDataController method writeSecureData.
@PrincipalHasWritePermsForPath
@RequestMapping(value = "/**", method = { POST, PUT }, consumes = ALL_VALUE)
public void writeSecureData(HttpEntity<String> httpEntity) {
CerberusPrincipal principal = sdbAccessRequest.getPrincipal();
secureDataService.writeSecret(sdbAccessRequest.getSdbId(), sdbAccessRequest.getPath(), Optional.ofNullable(httpEntity.getBody()).orElseThrow(() -> new RuntimeException("The body must not be null")), principal.getName());
}
Aggregations