public boolean checkAdmin() {
    return checkAuthorization(null);
  }
Determine whether or not the current view user has admin rights.

@return true if the current view user is an admin
ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java