            (or doc-name (if (seq (:document/name doc))
                           (:document/name doc)
                           "Untitled"))]
-          (when-not false ;(om/get-state owner :editing?)
+          (when (auth/contains-scope? auth/scope-heirarchy max-document-scope :admin)
             [:a.doc-name-edit {:role "button"
                                :title "Change this doc's name"
                                :on-click #(do (om/set-state! owner :editing? true)

            (common/icon :login)
            [:span "Log in"]]))))))

(defn doc-name [{:keys [doc-id doc-name]} owner]
  (reify
    om/IDisplayName (display-name [_] "Doc name")
    om/IInitState (init-state [_] {:listener-key (.getNextUniqueId (.getInstance IdGenerator))})


                     (keyword-identical? :start overlay-key)
                     (om/build doc-name {:doc-id (:document/id app)
                                         :doc-name (:doc-name app)
                                         :max-document-scope (:max-document-scope app)})

                     (namespaced? overlay-key)
                     (str (:title component) " " (str/capitalize (name overlay-key)))
