Skip to content
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

cpp aql current_user() v2 #3154

Closed
wants to merge 6 commits into from
Closed

cpp aql current_user() v2 #3154

wants to merge 6 commits into from

Conversation

baslr
Copy link
Contributor

@baslr baslr commented Aug 28, 2017

No description provided.

@baslr
Copy link
Contributor Author

baslr commented Aug 28, 2017

see #3063

@@ -3724,6 +3713,32 @@ AqlValue Functions::IsSameCollection(
return AqlValue(arangodb::basics::VelocyPackHelper::NullValue());
}

#include "Utils/ExecContext.h"
Copy link
Contributor

Choose a reason for hiding this comment

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

Please move the include to the top of the file

@baslr
Copy link
Contributor Author

baslr commented Sep 26, 2017

some internals have to change
req more infos @mchacki

@fceller fceller added the 9 WIP label Oct 13, 2017
@fceller
Copy link
Contributor

fceller commented Oct 13, 2017

@baslr

the test failed with:

[FAILED] testCurrentUser in 0.002 s: at assertion #1: assertEqual: ([ null ]) is not equal to ([ "root" ])

@mchacki mchacki self-assigned this Oct 13, 2017
@mchacki
Copy link
Member

mchacki commented Oct 13, 2017

Yes this is known issue with this branch. The reason is that without authentication turned on the JSLayer und C++ layer behave differently, namely:
JS looks into auth-header (which we send in this test) and despite of authentication returns the user in this header.
C++ takes the actual auth object (which is null without authentication) and does not have any reference to the request header any more.
Needs some internal rearrangement to be fixed.

@jsteemann
Copy link
Contributor

Can you pull latest devel into this branch and try to fix it?
You can probably use the ExecContext everywhere now.

@baslr
Copy link
Contributor Author

baslr commented Oct 23, 2017

@jsteemann also to devel xor exclusive to devel?

@jsteemann
Copy link
Contributor

devel only

@baslr
Copy link
Contributor Author

baslr commented Oct 25, 2017

new PR #3498

@baslr baslr closed this Oct 25, 2017
@fceller fceller deleted the feature/cpp-aql-current-user-v2 branch October 30, 2017 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants