public boolean checkPermission(String viewName, String version, String instanceName, boolean readOnly) {

    ViewInstanceEntity instanceEntity =
        instanceName == null ? null : getInstanceDefinition(viewName, version, instanceName);

    return checkPermission(instanceEntity, readOnly);
  }
Determine whether or not access to the view instance resource identified
by the given instance name should be allowed based on the permissions
granted to the current user.

@param viewName     the view name
@param version      the view version
@param instanceName the name of the view instance resource
@param readOnly     indicate whether or not this is for a read only operation
@return true if the access to the view instance is allowed
ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java