Remove isZkEnabled

This commit is contained in:
Ehren Kret 2021-09-17 11:28:58 -05:00
parent 8f17f45339
commit 3f3052c23c
1 changed files with 1 additions and 16 deletions

View File

@ -97,7 +97,6 @@ public class ProfileController {
private final PolicySigner policySigner; private final PolicySigner policySigner;
private final PostPolicyGenerator policyGenerator; private final PostPolicyGenerator policyGenerator;
private final ServerZkProfileOperations zkProfileOperations; private final ServerZkProfileOperations zkProfileOperations;
private final boolean isZkEnabled;
private final S3Client s3client; private final S3Client s3client;
private final String bucket; private final String bucket;
@ -115,8 +114,7 @@ public class ProfileController {
PostPolicyGenerator policyGenerator, PostPolicyGenerator policyGenerator,
PolicySigner policySigner, PolicySigner policySigner,
String bucket, String bucket,
ServerZkProfileOperations zkProfileOperations, ServerZkProfileOperations zkProfileOperations) {
boolean isZkEnabled) {
this.clock = clock; this.clock = clock;
this.rateLimiters = rateLimiters; this.rateLimiters = rateLimiters;
this.accountsManager = accountsManager; this.accountsManager = accountsManager;
@ -131,7 +129,6 @@ public class ProfileController {
this.s3client = s3client; this.s3client = s3client;
this.policyGenerator = policyGenerator; this.policyGenerator = policyGenerator;
this.policySigner = policySigner; this.policySigner = policySigner;
this.isZkEnabled = isZkEnabled;
} }
@Timed @Timed
@ -139,10 +136,6 @@ public class ProfileController {
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
public Response setProfile(@Auth AuthenticatedAccount auth, @Valid CreateProfileRequest request) { public Response setProfile(@Auth AuthenticatedAccount auth, @Valid CreateProfileRequest request) {
if (!isZkEnabled) {
throw new WebApplicationException(Response.Status.NOT_FOUND);
}
final Set<String> allowedPaymentsCountryCodes = final Set<String> allowedPaymentsCountryCodes =
dynamicConfigurationManager.getConfiguration().getPaymentsConfiguration().getAllowedCountryCodes(); dynamicConfigurationManager.getConfiguration().getPaymentsConfiguration().getAllowedCountryCodes();
@ -215,9 +208,6 @@ public class ProfileController {
@PathParam("uuid") UUID uuid, @PathParam("uuid") UUID uuid,
@PathParam("version") String version) @PathParam("version") String version)
throws RateLimitExceededException { throws RateLimitExceededException {
if (!isZkEnabled) {
throw new WebApplicationException(Response.Status.NOT_FOUND);
}
return getVersionedProfile(auth.map(AuthenticatedAccount::getAccount), accessKey, return getVersionedProfile(auth.map(AuthenticatedAccount::getAccount), accessKey,
getAcceptableLanguagesForRequest(containerRequestContext), uuid, getAcceptableLanguagesForRequest(containerRequestContext), uuid,
version, Optional.empty()); version, Optional.empty());
@ -235,9 +225,6 @@ public class ProfileController {
@PathParam("version") String version, @PathParam("version") String version,
@PathParam("credentialRequest") String credentialRequest) @PathParam("credentialRequest") String credentialRequest)
throws RateLimitExceededException { throws RateLimitExceededException {
if (!isZkEnabled) {
throw new WebApplicationException(Response.Status.NOT_FOUND);
}
return getVersionedProfile(auth.map(AuthenticatedAccount::getAccount), accessKey, return getVersionedProfile(auth.map(AuthenticatedAccount::getAccount), accessKey,
getAcceptableLanguagesForRequest(containerRequestContext), uuid, getAcceptableLanguagesForRequest(containerRequestContext), uuid,
version, Optional.of(credentialRequest)); version, Optional.of(credentialRequest));
@ -251,8 +238,6 @@ public class ProfileController {
String version, String version,
Optional<String> credentialRequest) Optional<String> credentialRequest)
throws RateLimitExceededException { throws RateLimitExceededException {
if (!isZkEnabled) throw new WebApplicationException(Response.Status.NOT_FOUND);
try { try {
if (requestAccount.isEmpty() && accessKey.isEmpty()) { if (requestAccount.isEmpty() && accessKey.isEmpty()) {
throw new WebApplicationException(Response.Status.UNAUTHORIZED); throw new WebApplicationException(Response.Status.UNAUTHORIZED);