Conversation
# Conflicts: # hugegraph-api/src/main/java/org/apache/hugegraph/config/ServerOptions.java
Codecov Report
@@ Coverage Diff @@
## master #2299 +/- ##
============================================
- Coverage 68.26% 68.15% -0.12%
Complexity 989 989
============================================
Files 500 501 +1
Lines 41516 41601 +85
Branches 5786 5799 +13
============================================
+ Hits 28342 28353 +11
- Misses 10415 10491 +76
+ Partials 2759 2757 -2
... and 10 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
hugegraph-api/src/main/java/org/apache/hugegraph/api/profile/WhiteIpAPI.java
Outdated
Show resolved
Hide resolved
hugegraph-api/src/main/java/org/apache/hugegraph/api/profile/WhiteIpAPI.java
Outdated
Show resolved
Hide resolved
hugegraph-api/src/main/java/org/apache/hugegraph/api/profile/WhiteIpAPI.java
Outdated
Show resolved
Hide resolved
hugegraph-api/src/main/java/org/apache/hugegraph/api/profile/WhiteIpAPI.java
Outdated
Show resolved
Hide resolved
hugegraph-api/src/main/java/org/apache/hugegraph/api/profile/WhiteIpAPI.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/auth/AuthManager.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/auth/AuthManager.java
Outdated
Show resolved
Hide resolved
| private final TokenGenerator tokenGenerator; | ||
| private final long tokenExpire; | ||
|
|
||
| private List<String> ipWhiteList; |
There was a problem hiding this comment.
mark final maybe we cant change it anymore?
There was a problem hiding this comment.
mark final maybe we cant change it anymore?
for Object, final/static will just fix the Memory Pointer Address, won't influence the inner value
just like the head pointer in the linked list
There was a problem hiding this comment.
mark final maybe we cant change it anymore?
for
Object,final/staticwill just fix the Memory Pointer Address, won't influence the inner valuejust like the head pointer in the linked list
like this?
private final List<String> ipWhiteList;
public void setWhiteIPs(List<String> ipWhiteList) {
this.ipWhiteList.clear();
this.ipWhiteList.addAll(ipWhiteList);
}
There was a problem hiding this comment.
mark final maybe we cant change it anymore?
for
Object,final/staticwill just fix the Memory Pointer Address, won't influence the inner value
just like the head pointer in the linked listlike this? we cant change object pointer. so we cant use
this.ipWhiteList = ipWhiteListin setWhiteIPs func.private final List<String> ipWhiteList; public void setWhiteIPs(List<String> ipWhiteList) { this.ipWhiteList.clear(); this.ipWhiteList.addAll(ipWhiteList); }
hugegraph-core/src/main/java/org/apache/hugegraph/auth/StandardAuthManager.java
Outdated
Show resolved
Hide resolved
hugegraph-api/src/main/java/org/apache/hugegraph/api/profile/WhiteIpListAPI.java
Outdated
Show resolved
Hide resolved
hugegraph-api/src/main/java/org/apache/hugegraph/api/profile/WhiteIpListAPI.java
Outdated
Show resolved
Hide resolved
hugegraph-api/src/main/java/org/apache/hugegraph/api/profile/WhiteIpListAPI.java
Outdated
Show resolved
Hide resolved
hugegraph-api/src/main/java/org/apache/hugegraph/api/profile/WhiteIpListAPI.java
Outdated
Show resolved
Hide resolved
| whiteIpList.removeAll(existed); | ||
| result.put("removed", existedIPs); | ||
| result.put("nonexistent", loadedIPs); | ||
| whiteIpList.removeAll(existedIPs); |
There was a problem hiding this comment.
try to set the type of whiteIpList to Set<String>
hugegraph-api/src/main/java/org/apache/hugegraph/api/profile/WhiteIpListAPI.java
Outdated
Show resolved
Hide resolved
hugegraph-api/src/main/java/org/apache/hugegraph/api/profile/WhiteIpListAPI.java
Outdated
Show resolved
Hide resolved
hugegraph-api/src/main/java/org/apache/hugegraph/config/ServerOptions.java
Outdated
Show resolved
Hide resolved
tips: - this feat works when auth mode was set. - this feat works when white ip status was enabled. because now PD is unavailable,just use java list; when pd ready , we can checkout pd.
tips: - this feat works when auth mode was set. - this feat works when white ip status was enabled. because now PD is unavailable,just use java list; when pd ready , we can checkout pd.
because no pd,just use java list; when pd ready , we can checkout pd.
tips:
test:
update whitelist :

check whitelist :
open whitelist :
