private void checkByTargetId(final String sha1Hash, final Long targetId) { LOG.debug("no anonymous download request, doing authentication check for target {} and artifact {}", targetId, sha1Hash); if (!controllerManagement.hasTargetArtifactAssigned(targetId, sha1Hash)) { LOG.info("target {} tried to download artifact {} which is not assigned to the target", targetId, sha1Hash); throw new EntityNotFoundException(); } LOG.info("download security check for target {} and artifact {} granted", targetId, sha1Hash); }
private void checkByControllerId(final String sha1Hash, final String controllerId) { LOG.debug("no anonymous download request, doing authentication check for target {} and artifact {}", controllerId, sha1Hash); if (!controllerManagement.hasTargetArtifactAssigned(controllerId, sha1Hash)) { LOG.info("target {} tried to download artifact {} which is not assigned to the target", controllerId, sha1Hash); throw new EntityNotFoundException(); } LOG.info("download security check for target {} and artifact {} granted", controllerId, sha1Hash); }