Commits

joberschweiber  committed 73670e1

Adjust some URLs

  • Participants
  • Parent commits 2aa4732

Comments (0)

Files changed (3)

File rhodecode/config/routing.py

                   action="show", conditions=dict(method=["GET"]))
         m.connect("formatted_admin_setting", "/settings/{setting_id}.{format}",
                   action="show", conditions=dict(method=["GET"]))
-        m.connect("admin_settings_my_account", "/my_account",
-                  action="my_account", conditions=dict(method=["GET"]))
-        m.connect("admin_settings_my_account_update", "/my_account_update",
-                  action="my_account_update", conditions=dict(method=["PUT"]))
-        m.connect("admin_settings_create_repository", "/create_repository",
-                  action="create_repository", conditions=dict(method=["GET"]))
 
+    rmap.connect('admin_settings_create_repository', '/repositories/new',
+            controller='admin/settings', action='create_repository', conditions=dict(method=['GET']))
+    rmap.connect('admin_settings_my_account', '/settings',
+            controller='admin/settings', action='my_account', conditions=dict(method=['GET']))
+    rmap.connect('admin_settings_my_account_update', '/settings/update',
+            controller='admin/settings', action='my_account_update', conditions=dict(method=['PUT']))
 
     #ADMIN MAIN PAGES
     with rmap.submapper(path_prefix=ADMIN_PREFIX,

File rhodecode/controllers/admin/repos.py

         """GET /repos/repo_name: Show a specific item"""
         # url('repo', repo_name=ID)
 
-    @HasPermissionAllDecorator('hg.admin')
+    @HasPermissionAnyDecorator('hg.admin')
     def edit(self, repo_name, format='html'):
         """GET /repos/repo_name/edit: Form to edit an existing item"""
         # url('edit_repo', repo_name=ID)

File rhodecode/controllers/admin/settings.py

             h.flash(_('error occurred during update of user %s') \
                     % form_result.get('username'), category='error')
 
-        return redirect(url('my_account'))
+        return redirect(url('admin_settings_my_account'))
 
     @NotAnonymous()
     @HasPermissionAnyDecorator('hg.admin', 'hg.create.repository')