Mercurial > kallithea
changeset 6080:073cf19b5067
routing: use 'delete_repo_group' and POST instead of DELETE
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Thu, 04 Aug 2016 14:23:36 +0200 |
parents | e701b312989c |
children | 4b4aab8082b7 |
files | kallithea/config/routing.py kallithea/templates/admin/repo_groups/repo_group_edit_advanced.html kallithea/templates/admin/repo_groups/repo_group_edit_settings.html kallithea/templates/data_table/_dt_elements.html kallithea/tests/functional/test_admin_users.py |
diffstat | 5 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/config/routing.py Thu Aug 04 14:23:36 2016 +0200 +++ b/kallithea/config/routing.py Thu Aug 04 14:23:36 2016 +0200 @@ -162,8 +162,8 @@ action="delete_perms", conditions=dict(method=["POST"], function=check_group)) - m.connect("delete_repo_group", "/repo_groups/{group_name:.*?}", - action="delete", conditions=dict(method=["DELETE"], + m.connect("delete_repo_group", "/repo_groups/{group_name:.*?}/delete", + action="delete", conditions=dict(method=["POST"], function=check_group_skip_path))
--- a/kallithea/templates/admin/repo_groups/repo_group_edit_advanced.html Thu Aug 04 14:23:36 2016 +0200 +++ b/kallithea/templates/admin/repo_groups/repo_group_edit_advanced.html Thu Aug 04 14:23:36 2016 +0200 @@ -16,7 +16,7 @@ %endfor </dl> -${h.form(h.url('repos_group', group_name=c.repo_group.group_name),method='delete')} +${h.form(h.url('delete_repos_group', group_name=c.repo_group.group_name))} <button class="btn btn-small btn-danger" type="submit" onclick="return confirm('${ungettext('Confirm to delete this group: %s with %s repository', 'Confirm to delete this group: %s with %s repositories',
--- a/kallithea/templates/admin/repo_groups/repo_group_edit_settings.html Thu Aug 04 14:23:36 2016 +0200 +++ b/kallithea/templates/admin/repo_groups/repo_group_edit_settings.html Thu Aug 04 14:23:36 2016 +0200 @@ -46,7 +46,7 @@ </div> ${h.end_form()} -${h.form(url('delete_repo_group', group_name=c.repo_group.group_name),method='delete')} +${h.form(url('delete_repo_group', group_name=c.repo_group.group_name))} <div class="form"> <div class="fields"> <div class="field" style="border:none;color:#888">
--- a/kallithea/templates/data_table/_dt_elements.html Thu Aug 04 14:23:36 2016 +0200 +++ b/kallithea/templates/data_table/_dt_elements.html Thu Aug 04 14:23:36 2016 +0200 @@ -184,7 +184,7 @@ </a> </div> <div style="float:left" class="grid_delete"> - ${h.form(h.url('repos_group', group_name=repo_group_name),method='delete')} + ${h.form(h.url('delete_repos_group', group_name=repo_group_name))} <i class="icon-minus-circled" style="color:#FF4444"></i> ${h.submit('remove_%s' % repo_group_name,_('Delete'),class_="action_button", onclick="return confirm('"+ungettext('Confirm to delete this group: %s with %s repository','Confirm to delete this group: %s with %s repositories',gr_count) % (repo_group_name, gr_count)+"');")}
--- a/kallithea/tests/functional/test_admin_users.py Thu Aug 04 14:23:36 2016 +0200 +++ b/kallithea/tests/functional/test_admin_users.py Thu Aug 04 14:23:36 2016 +0200 @@ -223,7 +223,7 @@ # response = self.app.get(url('repos_groups', id=rg.group_id)) response = self.app.post(url('delete_repo_group', group_name=groupname), - params={'_method': 'delete', '_authentication_token': self.authentication_token()}) + params={'_authentication_token': self.authentication_token()}) self.checkSessionFlash(response, 'Removed repository group %s' % groupname) response = self.app.post(url('user', id=new_user.user_id),