sentry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s..@apache.org
Subject incubator-sentry git commit: SENTRY-1097: Fix compilation errors from SentryGenericPolicyProcessor (Dapeng Sun, reviewed by Hao Hao)
Date Tue, 23 Feb 2016 05:06:28 GMT
Repository: incubator-sentry
Updated Branches:
  refs/heads/master 59bbfdc79 -> cee623339


SENTRY-1097: Fix compilation errors from SentryGenericPolicyProcessor (Dapeng Sun, reviewed
by Hao Hao)


Project: http://git-wip-us.apache.org/repos/asf/incubator-sentry/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-sentry/commit/cee62333
Tree: http://git-wip-us.apache.org/repos/asf/incubator-sentry/tree/cee62333
Diff: http://git-wip-us.apache.org/repos/asf/incubator-sentry/diff/cee62333

Branch: refs/heads/master
Commit: cee62333935d8e85143a65b67e553e12e6867849
Parents: 59bbfdc
Author: Sun Dapeng <sdp@apache.org>
Authored: Tue Feb 23 13:04:15 2016 +0800
Committer: Sun Dapeng <sdp@apache.org>
Committed: Tue Feb 23 13:04:48 2016 +0800

----------------------------------------------------------------------
 .../service/persistent/DelegateSentryStore.java       |  4 ++--
 .../service/thrift/SentryGenericPolicyProcessor.java  | 14 +++++++-------
 2 files changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/cee62333/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/generic/service/persistent/DelegateSentryStore.java
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/generic/service/persistent/DelegateSentryStore.java
b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/generic/service/persistent/DelegateSentryStore.java
index 34d3fea..1e497a0 100644
--- a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/generic/service/persistent/DelegateSentryStore.java
+++ b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/generic/service/persistent/DelegateSentryStore.java
@@ -436,8 +436,8 @@ public class DelegateSentryStore implements SentryStoreLayer {
     Preconditions.checkNotNull(component);
     Preconditions.checkNotNull(service);
 
-    component = toTrimedLower(component);
-    service = toTrimedLower(service);
+    component = toTrimmedLower(component);
+    service = toTrimmedLower(service);
 
     Set<MSentryGMPrivilege> privileges = Sets.newHashSet();
     PersistenceManager pm = null;

http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/cee62333/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/generic/service/thrift/SentryGenericPolicyProcessor.java
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/generic/service/thrift/SentryGenericPolicyProcessor.java
b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/generic/service/thrift/SentryGenericPolicyProcessor.java
index 69f275d..613f10f 100644
--- a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/generic/service/thrift/SentryGenericPolicyProcessor.java
+++ b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/generic/service/thrift/SentryGenericPolicyProcessor.java
@@ -606,8 +606,8 @@ public class SentryGenericPolicyProcessor implements SentryGenericPolicyService.
         validateClientVersion(request.getProtocol_version());
         Set<String> groups = getRequestorGroups(conf, request.getRequestorUserName());
         if (!inAdminGroups(groups)) {
-          Set<String> roleNamesForGroups = toTrimedLower(store.getRolesByGroups(request.getComponent(),
groups));
-          if (!roleNamesForGroups.contains(toTrimedLower(request.getRoleName()))) {
+          Set<String> roleNamesForGroups = toTrimmedLower(store.getRolesByGroups(request.getComponent(),
groups));
+          if (!roleNamesForGroups.contains(toTrimmedLower(request.getRoleName()))) {
             throw new SentryAccessDeniedException(ACCESS_DENIAL_MESSAGE + request.getRequestorUserName());
           }
         }
@@ -687,8 +687,8 @@ public class SentryGenericPolicyProcessor implements SentryGenericPolicyService.
 
         // Disallow non-admin to lookup roles that they are not part of
         if (activeRoleSet != null && !activeRoleSet.isAll()) {
-          Set<String> grantedRoles = toTrimedLower(store.getRolesByGroups(request.getComponent(),
requestedGroups));
-          Set<String> activeRoleNames = toTrimedLower(activeRoleSet.getRoles());
+          Set<String> grantedRoles = toTrimmedLower(store.getRolesByGroups(request.getComponent(),
requestedGroups));
+          Set<String> activeRoleNames = toTrimmedLower(activeRoleSet.getRoles());
 
           for (String activeRole : activeRoleNames) {
             if (!grantedRoles.contains(activeRole)) {
@@ -701,15 +701,15 @@ public class SentryGenericPolicyProcessor implements SentryGenericPolicyService.
           validActiveRoles.addAll(activeRoleSet.isAll() ? grantedRoles : Sets.intersection(activeRoleNames,
grantedRoles));
         }
       } else {
-        Set<String> allRoles = toTrimedLower(store.getAllRoleNames());
-        Set<String> activeRoleNames = toTrimedLower(activeRoleSet.getRoles());
+        Set<String> allRoles = toTrimmedLower(store.getAllRoleNames());
+        Set<String> activeRoleNames = toTrimmedLower(activeRoleSet.getRoles());
 
         // For admin, if requestedGroups are empty, valid active roles are intersection of
active roles and all roles.
         // Otherwise, valid active roles are intersection of active roles and the roles of
requestedGroups.
         if (requestedGroups == null || requestedGroups.isEmpty()) {
           validActiveRoles.addAll(activeRoleSet.isAll() ? allRoles : Sets.intersection(activeRoleNames,
allRoles));
         } else {
-          Set<String> requestedRoles = toTrimedLower(store.getRolesByGroups(request.getComponent(),
requestedGroups));
+          Set<String> requestedRoles = toTrimmedLower(store.getRolesByGroups(request.getComponent(),
requestedGroups));
           validActiveRoles.addAll(activeRoleSet.isAll() ? allRoles : Sets.intersection(activeRoleNames,
requestedRoles));
         }
       }


Mime
View raw message