Repository: incubator-sentry Updated Branches: refs/heads/master 9dba28bd6 -> 0416dc016
SENTRY-744: DB provider client should support grantServerPrivilege() method without action for backward compatibility ( Prasad Mujumdar, Reviewed by: Colin Ma) Project: http://git-wip-us.apache.org/repos/asf/incubator-sentry/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-sentry/commit/0416dc01 Tree: http://git-wip-us.apache.org/repos/asf/incubator-sentry/tree/0416dc01 Diff: http://git-wip-us.apache.org/repos/asf/incubator-sentry/diff/0416dc01 Branch: refs/heads/master Commit: 0416dc016b9f594f89cf3cfbe9702592c21bf6da Parents: 9dba28b Author: Sravya Tirukkovalur <[email protected]> Authored: Thu May 28 15:54:17 2015 -0700 Committer: Sravya Tirukkovalur <[email protected]> Committed: Thu May 28 15:54:17 2015 -0700 ---------------------------------------------------------------------- .../db/service/thrift/SentryPolicyServiceClient.java | 3 +++ .../thrift/SentryPolicyServiceClientDefaultImpl.java | 11 +++++++++++ 2 files changed, 14 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/0416dc01/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyServiceClient.java ---------------------------------------------------------------------- diff --git a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyServiceClient.java b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyServiceClient.java index 7a9f0df..05cbfb6 100644 --- a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyServiceClient.java +++ b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyServiceClient.java @@ -67,6 +67,9 @@ public interface SentryPolicyServiceClient { String action) throws SentryUserException; public TSentryPrivilege grantServerPrivilege(String requestorUserName, String roleName, + String server, Boolean grantOption) throws SentryUserException; + + public TSentryPrivilege grantServerPrivilege(String requestorUserName, String roleName, String server, String action, Boolean grantOption) throws SentryUserException; public TSentryPrivilege grantDatabasePrivilege(String requestorUserName, String roleName, http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/0416dc01/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyServiceClientDefaultImpl.java ---------------------------------------------------------------------- diff --git a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyServiceClientDefaultImpl.java b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyServiceClientDefaultImpl.java index 44681ca..c3c1907 100644 --- a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyServiceClientDefaultImpl.java +++ b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyServiceClientDefaultImpl.java @@ -300,6 +300,17 @@ public class SentryPolicyServiceClientDefaultImpl implements SentryPolicyService PrivilegeScope.SERVER, server, null, null, null, null, action); } + @Deprecated + /*** + * Should use grantServerPrivilege(String requestorUserName, + * String roleName, String server, String action, Boolean grantOption) + */ + public TSentryPrivilege grantServerPrivilege(String requestorUserName, + String roleName, String server, Boolean grantOption) throws SentryUserException { + return grantServerPrivilege(requestorUserName, roleName, server, + AccessConstants.ALL, grantOption); + } + public TSentryPrivilege grantServerPrivilege(String requestorUserName, String roleName, String server, String action, Boolean grantOption) throws SentryUserException {
