private boolean isOperator() {

    String url = String.format(AMBARI_OR_CLUSTER_ADMIN_PRIVILEGE_URL, context.getLoggedinUser(), context.getCluster().getName());

    try {
      String response = ambariApi.readFromAmbari(url, "GET", null, null);

      if(response != null && !response.isEmpty()){
        JSONObject json = (JSONObject) JSONValue.parse(response);
        if (json.containsKey("privileges")) {
          JSONArray privileges = (JSONArray) json.get("privileges");
          if(privileges.size() > 0) return true;
        }
      }

    } catch (AmbariHttpException e) {
      LOG.error("Got Error response from url : {}. Response : {}", url, e.getMessage(), e);
    }

    return false;
  }
Checks if the user is an operator.

@return    if <code>true</code>, the user is an operator; otherwise <code>false</code>
contrib/views/capacity-scheduler/src/main/java/org/apache/ambari/view/capacityscheduler/ConfigurationService.java