sunyuhan1998 opened a new pull request, #11274: URL: https://github.com/apache/gravitino/pull/11274
### What changes were proposed in this pull request? Add Grant/Revoke authorization operations to the Python client SDK: - **PermissionErrorHandler**: Error handler for grant/revoke REST API calls - **Grant/Revoke roles**: `grant_roles_to_user`, `revoke_roles_from_user`, `grant_roles_to_group`, `revoke_roles_from_group` - **Grant/Revoke privileges**: `grant_privileges_to_role`, `revoke_privileges_from_role` - **Input validation**: All grant/revoke methods validate parameters with `Precondition.check_string_not_empty` Note: `override_privileges_for_role` is not included and will be addressed separately. ### Why are the changes needed? This completes the Role authorization piece of issue #10782, building on top of PR #11210 (Role CRUD) which is already merged. Fix: #11096 ### Does this PR introduce _any_ user-facing change? Yes — new public APIs on `GravitinoClient` and `GravitinoMetalake`: - `grant_roles_to_user(role_names, user_name)` - `revoke_roles_from_user(role_names, user_name)` - `grant_roles_to_group(role_names, group_name)` - `revoke_roles_from_group(role_names, group_name)` - `grant_privileges_to_role(role_name, securable_object, privileges)` - `revoke_privileges_from_role(role_name, securable_object, privileges)` ### How was this patch tested? - Unit tests: 6 grant/revoke mock tests, 6 client delegate tests, 13 permission error handler assertions - Integration tests: 3 tests against a live Gravitino server (grant/revoke roles to user, grant/revoke roles to group, grant/revoke privileges to role) - Linting: `ruff check` clean, `pylint` 10/10 -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
