 (defrecord EnvIndices [identifier]
   Migration
   (apply- [this]
-    (doseq [id (systems-for "admin")]  
-      (update-system id (update-in (get-system id) [:env] keyword))))  
-  (rollback [this])) 
+    (doseq [id (systems-for "admin")]
+      (update-system id (update-in (get-system id) [:env] keyword))))
+  (rollback [this]))
 
 ; triggering owner indexing and setting default to admin
 (defrecord OwnerIndices [identifier]
   Migration
   (apply- [this]
-    (doseq [id (systems-for "admin")]  
+    (doseq [id (systems-for "admin")]
       (when-not ((get-system id) :owner)
-        (update-system id (assoc (get-system id) :owner "admin")))))  
+        (update-system id (assoc (get-system id) :owner "admin")))))
   (rollback [this]))
 
 ; index all existing systems into ES

      (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))) 
      (throw+ {:type ::persmission-env-violation} (<< "~{username} attempted to access system ~{system} in env ~{env}"))))))

(defn is-system? [s]


(def system-base {
   :owner #{:required :user-exists}
   :type #{:required :type-exists}
   :env #{:required :Keyword}
  })

