diff --git a/kallithea/config/routing.py b/kallithea/config/routing.py --- a/kallithea/config/routing.py +++ b/kallithea/config/routing.py @@ -119,8 +119,8 @@ def make_map(config): action="index", conditions=dict(method=["GET"])) m.connect("new_repo", "/create_repository", action="create_repository", conditions=dict(method=["GET"])) - m.connect("put_repo", "/repos/{repo_name:.*?}", - action="update", conditions=dict(method=["PUT"], + m.connect("update_repo", "/repos/{repo_name:.*?}", + action="update", conditions=dict(method=["POST"], function=check_repo)) m.connect("delete_repo", "/repos/{repo_name:.*?}/delete", action="delete", conditions=dict(method=["POST"])) diff --git a/kallithea/templates/admin/repos/repo_edit_settings.html b/kallithea/templates/admin/repos/repo_edit_settings.html --- a/kallithea/templates/admin/repos/repo_edit_settings.html +++ b/kallithea/templates/admin/repos/repo_edit_settings.html @@ -1,4 +1,4 @@ -${h.form(url('put_repo', repo_name=c.repo_info.repo_name), method='put')} +${h.form(url('update_repo', repo_name=c.repo_info.repo_name))}
diff --git a/kallithea/tests/functional/test_admin_repos.py b/kallithea/tests/functional/test_admin_repos.py --- a/kallithea/tests/functional/test_admin_repos.py +++ b/kallithea/tests/functional/test_admin_repos.py @@ -444,7 +444,7 @@ class _BaseTestCase(TestController): assert perm[0].permission.permission_name == 'repository.read' assert Repository.get_by_repo_name(self.REPO).private == False - response = self.app.put(url('put_repo', repo_name=self.REPO), + response = self.app.post(url('update_repo', repo_name=self.REPO), fixture._get_repo_create_params(repo_private=1, repo_name=self.REPO, repo_type=self.REPO_TYPE, @@ -459,7 +459,7 @@ class _BaseTestCase(TestController): assert len(perm), 1 assert perm[0].permission.permission_name == 'repository.none' - response = self.app.put(url('put_repo', repo_name=self.REPO), + response = self.app.post(url('update_repo', repo_name=self.REPO), fixture._get_repo_create_params(repo_private=False, repo_name=self.REPO, repo_type=self.REPO_TYPE,