コード例 #1
0
 private Iterable<Privilege> getPrivileges(
     Set<String> groups, ActiveRoleSet roleSet, Authorizable[] authorizables) {
   return Iterables.transform(
       appendDefaultDBPriv(policy.getPrivileges(groups, roleSet, authorizables), authorizables),
       new Function<String, Privilege>() {
         @Override
         public Privilege apply(String privilege) {
           return privilegeFactory.createPrivilege(privilege);
         }
       });
 }
コード例 #2
0
 @Override
 public Set<String> listPrivilegesForGroup(String groupName) throws SentryConfigurationException {
   return policy.getPrivileges(Sets.newHashSet(groupName), ActiveRoleSet.ALL, null);
 }
コード例 #3
0
 @Override
 public Set<String> listPrivilegesForSubject(Subject subject) throws SentryConfigurationException {
   return policy.getPrivileges(getGroups(subject), ActiveRoleSet.ALL, null);
 }