Fixed WebUserAuthException when viewing "/" in HTTPS mode.

This commit is contained in:
Rsl1122 2018-02-07 11:39:16 +02:00
parent bc1036572f
commit af3bdc642d

View File

@ -4,7 +4,6 @@
*/
package com.djrapitops.plan.system.webserver.pages;
import com.djrapitops.plan.api.exceptions.WebUserAuthException;
import com.djrapitops.plan.api.exceptions.connection.WebException;
import com.djrapitops.plan.data.WebUser;
import com.djrapitops.plan.system.webserver.Request;
@ -12,8 +11,6 @@ import com.djrapitops.plan.system.webserver.ResponseHandler;
import com.djrapitops.plan.system.webserver.auth.Authentication;
import com.djrapitops.plan.system.webserver.response.DefaultResponses;
import com.djrapitops.plan.system.webserver.response.Response;
import com.djrapitops.plan.system.webserver.response.errors.InternalErrorResponse;
import com.djrapitops.plugin.api.utility.log.Log;
import java.util.Collections;
import java.util.List;
@ -21,7 +18,7 @@ import java.util.Optional;
/**
* PageHandler for / page (Address root).
*
* <p>
* Not Available if Authentication is not enabled.
*
* @author Rsl1122
@ -41,7 +38,6 @@ public class RootPageHandler extends PageHandler {
return DefaultResponses.BASIC_AUTH.get();
}
try {
WebUser webUser = auth.get().getWebUser();
int permLevel = webUser.getPermLevel();
@ -55,10 +51,6 @@ public class RootPageHandler extends PageHandler {
default:
return responseHandler.forbiddenResponse();
}
} catch (WebUserAuthException e) {
Log.toLog(this.getClass(), e);
return new InternalErrorResponse("/", e);
}
}
@Override