tristaZero commented on a change in pull request #9743:
URL: https://github.com/apache/shardingsphere/pull/9743#discussion_r597542210
##########
File path:
shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/admin/mysql/executor/ShowDatabasesExecutor.java
##########
@@ -54,10 +54,16 @@ public void execute(final BackendConnection
backendConnection) {
return Collections.emptyList();
}
Collection<Object> result = new LinkedList<>();
- for (String each : ProxyContext.getInstance().getAllSchemaNames()) {
- // TODO : Need to check whether PrivilegeType.SHOW_DB is correct
or enough?
- if (privilege.get().hasPrivileges(each,
Collections.singletonList(PrivilegeType.SHOW_DB))) {
- result.add(each);
+ Collection<PrivilegeType> privileges = new LinkedList<>();
+ privileges.add(PrivilegeType.SUPER);
Review comment:
Is it necessary?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]