 
 (comment
 
-  (def context {:system user/system})
-  (def context {:system (get-in user/system [:apps :search])})
-  (acl-service/add-acl-conditions-to-query context @last-query)
+  (def query (cmr.common.dev.capture-reveal/reveal query))
+  (def context (cmr.common.dev.capture-reveal/reveal context))
+
+  (acl-service/add-acl-conditions-to-query context query)
 
 )
 

  on whether the user's query contained collection ids. This implementation assumes the query-coll-ids
  passed in are limited to the provider of the collection identifier."
  [context query-coll-ids provider-id collection-identifier]
  (if-let [{:keys [entry-titles access-value]} collection-identifier]
    (let [entry-titles-cond (provider+entry-titles->collection-condition
                              context query-coll-ids provider-id entry-titles)
          access-value-cond (some-> (access-value->query-condition access-value)
                                    q/->CollectionQueryCondition)]
      (if (and entry-titles-cond access-value-cond)
        (gc/and-conds [entry-titles-cond access-value-cond])
        (or entry-titles-cond access-value-cond)))
    ;; No other collection info provided so every collection in provider is possible
    (provider->collection-condition query-coll-ids provider-id)))

(defn granule-identifier->query-cond
  "Converts an acl granule identifier into a query condition."

    (if (and collection-cond granule-cond)
      (gc/and-conds [collection-cond granule-cond])
      (or collection-cond granule-cond))))

(defn acls->query-condition
  "Converts a list of acls into a query condition. coll-ids-by-prov should be a map of provider ids
