tristaZero commented on a change in pull request #9743:
URL: https://github.com/apache/shardingsphere/pull/9743#discussion_r597541950
##########
File path:
shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/command/admin/initdb/MySQLComInitDbExecutor.java
##########
@@ -54,7 +54,9 @@
private boolean isAuthorizedSchema(final String schema) {
Optional<ShardingSpherePrivilege> privilege =
ProxyContext.getInstance().getMetaDataContexts().getAuthentication().findPrivilege(backendConnection.getGrantee());
- // TODO : privilege.hasPrivileges(schema, xxx) (xxx means the
privileges needed here), rather than Collections.emptyList()
- return privilege.isPresent() && privilege.get().hasPrivileges(schema,
Collections.emptyList());
+ if (privilege.isPresent()) {
+ return privilege.get().hasPrivileges(schema);
Review comment:
return privilege.isPresent()? privilege.get().hasPrivileges(schema) :
--
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]