--- a/ForgeHg/forgehg/hg_main.py
+++ b/ForgeHg/forgehg/hg_main.py
@@ -220,7 +220,6 @@
         from_project = c.project
         to_project = Project.query.get(shortname=to_project_name)
         with h.push_config(c, project=to_project):
-            require(has_project_access('tool', to_project))
             if request.method!='POST' or to_name is None:
                 prefix_len = len(to_project_name+'/')
                 in_use = [sp.shortname[prefix_len:] for sp in to_project.direct_subprojects]
@@ -231,6 +230,9 @@
                             to_name=to_name or '')
             else:
                 try:
+                    if not to_project.database_configured:
+                        to_project.configure_project_database(is_user_project=True)
+                    require(has_project_access('tool', to_project))
                     to_project.install_app(
                         'Hg', to_name,
                         cloned_from_project_id=from_project._id,