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

fix auth: property of int or date type can't be filtered #1004

Merged
merged 8 commits into from
Jun 4, 2020
Merged

Conversation

javeme
Copy link
Contributor

@javeme javeme commented May 26, 2020

Change-Id: I794165b89b9d21f31938f09daa2041881ba2eb8d

Change-Id: I794165b89b9d21f31938f09daa2041881ba2eb8d
Change-Id: I13678f1a28886c9592f8ea2ae51f953a5b4d6774
Change-Id: Id07a2f24b4625402250bd5e137f3db7eef3a8888
@codecov
Copy link

codecov bot commented May 27, 2020

Codecov Report

Merging #1004 into master will decrease coverage by 0.18%.
The diff coverage is 56.90%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1004      +/-   ##
============================================
- Coverage     69.35%   69.16%   -0.19%     
- Complexity     5275     5361      +86     
============================================
  Files           325      328       +3     
  Lines         25870    26215     +345     
  Branches       3647     3731      +84     
============================================
+ Hits          17941    18131     +190     
- Misses         6207     6325     +118     
- Partials       1722     1759      +37     
Impacted Files Coverage Δ Complexity Δ
...idu/hugegraph/api/filter/AuthenticationFilter.java 34.72% <ø> (ø) 0.00 <0.00> (ø)
...n/java/com/baidu/hugegraph/api/graph/BatchAPI.java 27.41% <0.00%> (ø) 0.00 <0.00> (ø)
...va/com/baidu/hugegraph/auth/HugeAuthenticator.java 14.50% <0.00%> (ø) 0.00 <0.00> (ø)
...a/com/baidu/hugegraph/auth/HugeGraphAuthProxy.java 4.29% <0.00%> (-0.05%) 0.00 <0.00> (ø)
...aidu/hugegraph/auth/WsAndHttpBasicAuthHandler.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
.../java/com/baidu/hugegraph/auth/ResourceObject.java 73.77% <0.00%> (-1.23%) 7.00 <0.00> (ø)
...in/java/com/baidu/hugegraph/auth/SchemaDefine.java 69.91% <0.00%> (-9.09%) 10.00 <0.00> (ø)
...du/hugegraph/schema/builder/IndexLabelBuilder.java 86.11% <ø> (-0.74%) 114.00 <0.00> (+7.00) ⬇️
...ava/com/baidu/hugegraph/structure/HugeElement.java 70.52% <0.00%> (-0.38%) 70.00 <7.00> (+1.00) ⬇️
...aidu/hugegraph/backend/store/hbase/HbaseTable.java 78.75% <0.00%> (ø) 37.00 <0.00> (ø)
... and 51 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update eb8fa1c...92d27d6. Read the comment docs.

support construct blob from byte[],base64-string,hex-string,byte-list

Change-Id: I47357c537dcdacae2913139fd55f3794f57f322a
Change-Id: I62bb87ac346813984c23038f27e24e5566bb3cac
houzhizhen
houzhizhen previously approved these changes Jun 1, 2020
Change-Id: Ic13c7a4bc8ebd591f3f8e5657fcc3cb1708706f9
Change-Id: Ice21c4493347d8ca02cce2d184648ef3824484e3
@@ -48,7 +48,7 @@
public static final String KEY_PASSWORD =
CredentialGraphTokens.PROPERTY_PASSWORD;
public static final String KEY_ROLE = "role";
public static final String KEY_CLIENT = "client";
public static final String KEY_CLIENT = "address";
Copy link
Contributor

Choose a reason for hiding this comment

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

rename to KEY_ADDRESS

public static boolean isWebSocket(final HttpMessage msg) {
final String connectionHeader = msg.headers().get(CONNECTION);
final String upgradeHeader = msg.headers().get(UPGRADE);
return "Upgrade".equalsIgnoreCase(connectionHeader) ||
Copy link
Contributor

Choose a reason for hiding this comment

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

recheck to make sure it's expected

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure

public <V> Object serialValue(V value) {
V validValue = this.validValue(value);
E.checkArgument(validValue != null,
"Invalid property value '%s' for key '%s'",
value, this.name());
E.checkArgument(this.cardinality == Cardinality.SINGLE,
Copy link
Contributor

Choose a reason for hiding this comment

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

this. cardinality.single()

Collection<T> validValues;
if (!(value instanceof Collection)) {
if (this.cardinality == Cardinality.SINGLE) {
Copy link
Contributor

Choose a reason for hiding this comment

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

this.cardinality.single()

Change-Id: I9227897f9ddb00cb5cf0547e43fc8d06c150f191
@Linary Linary merged commit 073b070 into master Jun 4, 2020
@Linary Linary deleted the auth-bug2 branch June 4, 2020 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants