1
0
Fork 0

Fix WebUI Login with read-only (#6501)

This commit is contained in:
Jan 2018-09-14 15:23:51 +02:00 committed by GitHub
parent 6e4200d418
commit 71e5d2aa49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 5 deletions

View File

@ -102,12 +102,14 @@ VocbaseContext* VocbaseContext::create(GeneralRequest& req, TRI_vocbase_t& vocba
void VocbaseContext::forceSuperuser() {
TRI_ASSERT(_type != ExecContext::Type::Internal || _user.empty());
if (ServerState::readOnly()) {
return; // ignore force
}
_type = ExecContext::Type::Internal;
_systemDbAuthLevel = auth::Level::RW;
_databaseAuthLevel = auth::Level::RW;
if (ServerState::readOnly()) {
_systemDbAuthLevel = auth::Level::RO;
_databaseAuthLevel = auth::Level::RO;
} else {
_systemDbAuthLevel = auth::Level::RW;
_databaseAuthLevel = auth::Level::RW;
}
}
void VocbaseContext::forceReadOnly() {