boolean isViewOperation(PreEventContext preEventContext) {
    boolean ret = false;

    PreEventContext.PreEventType  preEventType = preEventContext.getEventType();

    switch (preEventType) {
      case CREATE_TABLE:
        PreCreateTableEvent preCreateTableEvent = (PreCreateTableEvent) preEventContext;
        Table table = preCreateTableEvent.getTable();
        ret         = isViewType(table);
        break;
      case ALTER_TABLE:
        PreAlterTableEvent preAlterTableEvent  = (PreAlterTableEvent) preEventContext;
        Table inTable  = preAlterTableEvent.getOldTable();
        Table outTable = preAlterTableEvent.getNewTable();
        ret            = (isViewType(inTable) || isViewType(outTable));
        break;
      case  DROP_TABLE:
        PreDropTableEvent preDropTableEvent = (PreDropTableEvent) preEventContext;
        Table droppedTable = preDropTableEvent.getTable();
        ret                = isViewType(droppedTable);
        break;
    }

    return ret;
  }
HiveMetaStoreAuthorizer :  Do authorization checks on MetaStore Events in MetaStorePreEventListener
ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/metastore/HiveMetaStoreAuthorizer.java