1
0
Fork 0

AuthenticationFeature::isEnabled() is not doing what is expected (#7373)

This commit is contained in:
Jan 2018-11-20 11:30:10 +01:00 committed by GitHub
parent ee45b6a595
commit eda236f968
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -153,7 +153,7 @@ void RestAdminServerHandler::handleMode() {
} else if (requestType == rest::RequestType::PUT) {
AuthenticationFeature* af = AuthenticationFeature::instance();
if (af->isEnabled() && !_request->user().empty()) {
if (af->isActive() && !_request->user().empty()) {
auth::Level lvl = auth::Level::NONE;
if (af->userManager() != nullptr) {
lvl = af->userManager()->databaseAuthLevel(_request->user(),

View File

@ -51,7 +51,7 @@ RestStatus RestShutdownHandler::execute() {
}
AuthenticationFeature* af = AuthenticationFeature::instance();
if (af->isEnabled() && !_request->user().empty()) {
if (af->isActive() && !_request->user().empty()) {
auth::Level lvl = auth::Level::NONE;
if (af->userManager() != nullptr) {
lvl = af->userManager()->databaseAuthLevel(_request->user(), "_system", /*configured*/true);