Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -679,14 +679,14 @@ public void clearBackend() {
@Override
public void truncateBackend() {
verifyAdminPermission();
HugeUser admin = this.hugegraph.userManager()
.findUser(HugeAuthenticator.USER_ADMIN);
UserManager userManager = this.hugegraph.userManager();
HugeUser admin = userManager.findUser(HugeAuthenticator.USER_ADMIN);
try {
this.hugegraph.truncateBackend();
} finally {
if (admin != null) {
if (admin != null && userManager instanceof StandardUserManager) {
// Restore admin user to continue to do any operation
this.hugegraph.userManager().createUser(admin);
userManager.createUser(admin);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ public class HugeSecurityManager extends SecurityManager {
private static final Set<String> WHITE_SYSTEM_PROPERTYS = ImmutableSet.of(
"line.separator",
"file.separator",
"java.specification.version", // Sofa
"socksProxyHost", // MySQL
"file.encoding" // PostgreSQL
);
Expand Down