Changeset - 073cf19b5067
[Not reviewed]
default
0 5 0
Mads Kiilerich - 9 years ago 2016-08-04 14:23:36
madski@unity3d.com
routing: use 'delete_repo_group' and POST instead of DELETE
5 files changed with 6 insertions and 6 deletions:
0 comments (0 inline, 0 general)
kallithea/config/routing.py
Show inline comments
 
@@ -162,8 +162,8 @@ def make_map(config):
 
                  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))
 

	
 

	
kallithea/templates/admin/repo_groups/repo_group_edit_advanced.html
Show inline comments
 
@@ -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',
kallithea/templates/admin/repo_groups/repo_group_edit_settings.html
Show inline comments
 
@@ -46,7 +46,7 @@ ${h.form(url('repos_group',group_name=c.
 
</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">
kallithea/templates/data_table/_dt_elements.html
Show inline comments
 
@@ -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)+"');")}
kallithea/tests/functional/test_admin_users.py
Show inline comments
 
@@ -223,7 +223,7 @@ class TestAdminUsersController(TestContr
 
        # 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),
0 comments (0 inline, 0 general)