8000 Fix WebUI Login with read-only by graetzer · Pull Request #6500 · arangodb/arangodb · GitHub
[go: up one dir, main page]

Skip to content

Fix WebUI Login with read-only #6500

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 14, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions arangod/RestServer/VocbaseContext.cpp
< 4197 td id="diff-862d369d9eb15fc89cc873052e98b9e9a3b45f5cc42e0b327e73cfb246b80c42R115" data-line-number="115" class="blob-num blob-num-context js-linkable-line-number js-blob-rnum">
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,14 @@ VocbaseContext* VocbaseContext::create(GeneralRequest& req, TRI_vocbase_t& vocba

void VocbaseContext::forceSuperuser() {
TRI_ASSERT(_type != ExecContext::Type::Internal || _user.empty());
_type = ExecContext::Type::Internal;
if (ServerState::readOnly()) {
return; // ignore force
_systemDbAuthLevel = auth::Level::RO;
_databaseAuthLevel = auth::Level::RO;
} else {
_systemDbAuthLevel = auth::Level::RW;
_databaseAuthLevel = auth::Level::RW;
}
_type = ExecContext::Type::Internal;
_systemDbAuthLevel = auth::Level::RW;
_databaseAuthLevel = auth::Level::RW;
}

void VocbaseContext::forceReadOnly() {
Expand Down
0