8000 revert HTTP return code change for user API, add tests by jsteemann · Pull Request #11331 · arangodb/arangodb · GitHub
[go: up one dir, main page]

Skip to content

revert HTTP return code change for user API, add tests #11331

8000
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 6 commits into from
Mar 25, 2020
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
simplification
  • Loading branch information
jsteemann committed Mar 25, 2020
commit bf4ffeffee70965ac09a0e00d87619ed2a62c6a6
4 changes: 3 additions & 1 deletion arangod/GeneralServer/CommTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,9 @@ CommTask::Flow CommTask::canAccessPath(auth::TokenCache::Entry const& token,
VocbaseContext* vc = static_cast<VocbaseContext*>(req.requestContext());
TRI_ASSERT(vc != nullptr);
// deny access to database with NONE
if (vc->databaseAuthLevel() == auth::Level::NONE && !StringUtils::isPrefix(path, ApiUser)) {
if (result == Flow::Continue &&
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bit unnecessary to do this check then is it?

vc->databaseAuthLevel() == auth::Level::NONE &&
!StringUtils::isPrefix(path, ApiUser)) {
result = Flow::Abort;
LOG_TOPIC("0898a", TRACE, Logger::AUTHORIZATION) << "Access forbidden to " << path;
}
Expand Down
0