jingshanglu commented on a change in pull request #9743:
URL: https://github.com/apache/shardingsphere/pull/9743#discussion_r599262529
##########
File path:
shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/admin/mysql/executor/UseDatabaseExecutor.java
##########
@@ -48,7 +47,6 @@ public void execute(final BackendConnection
backendConnection) {
private boolean isAuthorizedSchema(final BackendConnection
backendConnection, final String schema) {
Optional<ShardingSpherePrivilege> privilege =
ProxyContext.getInstance().getMetaDataContexts().getAuthentication().findPrivilege(backendConnection.getGrantee());
- // TODO : Need to check whether PrivilegeType.USAGE is correct or
enough?
- return privilege.isPresent() && privilege.get().hasPrivileges(schema,
Collections.emptyList());
+ return privilege.isPresent() && privilege.get().hasPrivileges(schema)
? true : false;
Review comment:
@tristaZero It has been changed.
--
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]