@Override
  public void applyAuthorizationConfigPolicy(HiveConf hiveConf) throws HiveAuthzPluginException {
    // First apply configuration applicable to both Hive Cli and HiveServer2
    // Not adding any authorization related restrictions to hive cli
    // grant all privileges for table to its owner - set this in cli as well so that owner
    // has permissions via HiveServer2 as well.
    hiveConf.setVar(ConfVars.HIVE_AUTHORIZATION_TABLE_OWNER_GRANTS, "INSERT,SELECT,UPDATE,DELETE");

    // Apply rest of the configuration only to HiveServer2
    if (sessionCtx.getClientType() == CLIENT_TYPE.HIVESERVER2
        && hiveConf.getBoolVar(ConfVars.HIVE_AUTHORIZATION_ENABLED)) {

      // Configure PRE_EXEC_HOOKS with DisallowTransformHook to disallow transform queries
      String hooks = hiveConf.getVar(ConfVars.PRE_EXEC_HOOKS).trim();
      if (hooks.isEmpty()) {
        hooks = DisallowTransformHook.class.getName();
      } else {
        hooks = hooks + "," + DisallowTransformHook.class.getName();
      }
      LOG.debug("Configuring hooks : " + hooks);
      hiveConf.setVar(ConfVars.PRE_EXEC_HOOKS, hooks);

      SettableConfigUpdater.setHiveConfWhiteList(hiveConf);

    }
  }
@return true only if current role of user is Admin
@throws HiveAuthzPluginException
ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/sqlstd/SQLStdHiveAccessController.java