   [_ _ {:keys [login scope]} _ {{api-ch :api} :comms}]
   (api/set-user-admin-scope login scope api-ch))
 
+(defmethod control-event :system-setting-changed
+  [_ _ {:keys [name]} state]
+  (update-in state state/system-settings-path
+             (fn [settings]
+               (mapv #(if (= name (:name %))
+                        (assoc % :updating true)
+                        %)
+                     settings))))
+
+(defmethod post-control-event! :system-setting-changed
+  [_ _ {:keys [name value]} _ {{api-ch :api} :comms}]
+  (api/set-system-setting name value api-ch))
+
 (defmethod control-event :insights-sorting-changed
   [_ _ {:keys [new-sorting]} state]
   (assoc-in state state/insights-sorting-path new-sorting))

  [target message {:keys [project-id project-name fingerprint]} previous-state current-state]
  (let [uuid frontend.async/*uuid*
        api-ch (get-in current-state [:comms :api])
        err-ch (get-in current-state [:comms :errors])]
    (go (let [api-resp (<! (ajax/managed-ajax
                             :delete
                             (gstring/format "/api/v1/project/%s/checkout-key/%s" project-name fingerprint)))]
          (if (= :success (:status api-resp))
            (let [api-resp (<! (ajax/managed-ajax :get (gstring/format "/api/v1/project/%s/checkout-key" project-name)))]
              (put! api-ch [:project-checkout-key (:status api-resp) (assoc api-resp :context {:project-name project-name})]))
            (put! err-ch [:api-error api-resp]))
          (release-button! uuid (:status api-resp))))))

                 (gstring/format "/api/v1/project/%s/enable" project)
                 :stop-building-project
                 api-ch
                 :context {:project-id project-id})
    :events {:success #(analytics/track {:event-type :project-builds-stopped
                                         :current-state current-state
                                         :properties {:org org-name
                                                      :repo repo-name}})}))

;; XXX: clean this up
(defmethod post-control-event! :container-parent-scroll
