private String getErrorMessage(PreEventContext preEventContext, String user) {
    String err = "Operation type " + preEventContext.getEventType().name() + " not allowed for user:" + user;
    return err;
  }
HiveMetaStoreAuthorizer :  Do authorization checks on MetaStore Events in MetaStorePreEventListener
ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/metastore/HiveMetaStoreAuthorizer.java