You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2021/08/09 09:32:25 UTC

[GitHub] [shardingsphere] yx9o opened a new issue #11723: SchemaPrivilegeBuilder does not support anyotherhost to obtain the schema

yx9o opened a new issue #11723:
URL: https://github.com/apache/shardingsphere/issues/11723


   
   Hi, community, I added a test case for `SchemaPrivilegeBuilder`, and found that the scenario of `when using user1 login from any other host, you can use database test and db_dal_admin` is currently not supported.
   
   `user-schema-mappings: root@localhost=test, user1@127.0.0.1=db_dal_admin, user1@=test, user1@=test1`
   
   ```java
       @Test
       public void assertFindPrivileges() {
           SchemaPrivilegesPermittedAuthorityProviderAlgorithm algorithm = new SchemaPrivilegesPermittedAuthorityProviderAlgorithm();
           Properties properties = new Properties();
           properties.setProperty(PROP_USER_SCHEMA_MAPPINGS, "root@localhost=test, user1@127.0.0.1=db_dal_admin, user1@=test, user1@=test1");
           algorithm.setProps(properties);
           algorithm.init(Collections.emptyMap(), Collections.singletonList(new ShardingSphereUser("user1", "", "127.0.0.2")));
           Optional<ShardingSpherePrivileges> privileges = algorithm.findPrivileges(new Grantee("user1", "127.0.0.2"));
           assertTrue(privileges.isPresent());
           assertTrue(privileges.get().hasPrivileges("test"));
       }
   ```
   
   ### Which version of ShardingSphere did you use?
   master branch
   
   ### Expected behavior
   `assertTrue(privileges.get().hasPrivileges("test"));`
   Can get the test, the verification is passed.
   
   ### Actual behavior
   `assertTrue(privileges.get().hasPrivileges("test"));`
   The test cannot be obtained, and the verification fails.
   


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] tristaZero closed issue #11723: SchemaPrivilegeBuilder does not support anyotherhost to obtain the schema

Posted by GitBox <gi...@apache.org>.
tristaZero closed issue #11723:
URL: https://github.com/apache/shardingsphere/issues/11723


   


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] yx9o commented on issue #11723: SchemaPrivilegeBuilder does not support anyotherhost to obtain the schema

Posted by GitBox <gi...@apache.org>.
yx9o commented on issue #11723:
URL: https://github.com/apache/shardingsphere/issues/11723#issuecomment-895078900


   please assign to me.


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org