       (when (and (not (su? curr-user)) (not= username owner))
         (throw+ {:type ::persmission-owner-violation} (<< "non super user ~{username} attempted to access a system owned by ~{owner}!"))
       )
-     (when (and (not (system? curr-user)) env (not ((into #{} envs) env))) 
+     (when (and (not (system? curr-user)) env (not ((into #{} envs) env)))
       (throw+ {:type ::persmission-env-violation} (<< "~{username} attempted to access system ~{system} in env ~{env}"))))))
 
 (defn is-system? [s]

      (flatten (map #(get-system-index :env (keyword %)) envs))
      (get-system-index :owner username))))

(defn re-index 
   "Re-indexes all systems available to the current user under elasticsearch."
   [username]
   (es/re-index (map #(vector % (get-system %)) (systems-for username))))

(comment
  Celestial, Copyright 2012 Ronen Narkis, narkisr.com
  Licensed under the Apache License,
  Version 2.0  (the "License") you may not use this file except in compliance with the License.
