8000 Fix WebUI Login with read-only (#6500) · arangodb/arangodb@375f728 · GitHub
[go: up one dir, main page]

Skip to content

Commit 375f728

Browse files
graetzerjsteemann
authored andcommitted
Fix WebUI Login with read-only (#6500)
1 parent 52e0fac commit 375f728

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

arangod/RestServer/VocbaseContext.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,14 @@ VocbaseContext* VocbaseContext::create(GeneralRequest& req, TRI_vocbase_t& vocba
102102

103103
void VocbaseContext::forceSuperuser() {
104104
TRI_ASSERT(_type != ExecContext::Type::Internal || _user.empty());
105+
_type = ExecContext::Type::Internal;
105106
if (ServerState::readOnly()) {
106-
return; // ignore force
107+
_systemDbAuthLevel = auth::Level::RO;
108+
_databaseAuthLevel = auth::Level::RO;
109+
} else {
110+
_systemDbAuthLevel = auth::Level::RW;
111+
_databaseAuthLevel = auth::Level::RW;
107112
}
108-
_type = ExecContext::Type::Internal;
109-
_systemDbAuthLevel = auth::Level::RW;
110-
_databaseAuthLevel = auth::Level::RW;
111113
}
112114

113115
void VocbaseContext::forceReadOnly() {

0 commit comments

Comments
 (0)
0