jerryshao commented on code in PR #6820: URL: https://github.com/apache/gravitino/pull/6820#discussion_r2027393552
########## clients/client-java/src/test/java/org/apache/gravitino/client/integration/test/authorization/AccessControlIT.java: ########## @@ -218,6 +218,22 @@ void testManageRoles() { Assertions.assertEquals(createdPrivilege.name(), Privilege.Name.CREATE_CATALOG); Assertions.assertEquals(createdPrivilege.condition(), Privilege.Condition.ALLOW); + // Test a metalake object with model privileges + SecurableObject metalakeObjectWithModelPrivs = + SecurableObjects.ofMetalake( + metalakeName, + Lists.newArrayList( + Privileges.CreateModel.allow(), + Privileges.CreateModelVersion.allow(), + Privileges.UseModel.allow())); + role = + metalake.createRole( + "model_name", properties, Lists.newArrayList(metalakeObjectWithModelPrivs)); + + Assertions.assertEquals("model_name", role.name()); + Assertions.assertEquals(properties, role.properties()); + metalake.deleteRole("model_name"); Review Comment: Can you please add more tests for model privileges on the catalog, schema and model? Also, please add some bad case verifications. -- 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: commits-unsubscr...@gravitino.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org