Mercurial > kallithea
comparison rhodecode/config/routing.py @ 2833:2f3cba7b6d16 beta
Add quick toggle link for locking for users with write or admin permissions
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Wed, 12 Sep 2012 17:15:25 +0200 |
parents | 1670ee0aded7 |
children | d998cc84cf72 0ebdd15de1d8 |
comparison
equal
deleted
inserted
replaced
2832:b711b3377372 | 2833:2f3cba7b6d16 |
---|---|
139 action="repo_as_fork", conditions=dict(method=["PUT"], | 139 action="repo_as_fork", conditions=dict(method=["PUT"], |
140 function=check_repo)) | 140 function=check_repo)) |
141 m.connect('repo_locking', "/repo_locking/{repo_name:.*?}", | 141 m.connect('repo_locking', "/repo_locking/{repo_name:.*?}", |
142 action="repo_locking", conditions=dict(method=["PUT"], | 142 action="repo_locking", conditions=dict(method=["PUT"], |
143 function=check_repo)) | 143 function=check_repo)) |
144 | |
144 with rmap.submapper(path_prefix=ADMIN_PREFIX, | 145 with rmap.submapper(path_prefix=ADMIN_PREFIX, |
145 controller='admin/repos_groups') as m: | 146 controller='admin/repos_groups') as m: |
146 m.connect("repos_groups", "/repos_groups", | 147 m.connect("repos_groups", "/repos_groups", |
147 action="create", conditions=dict(method=["POST"])) | 148 action="create", conditions=dict(method=["POST"])) |
148 m.connect("repos_groups", "/repos_groups", | 149 m.connect("repos_groups", "/repos_groups", |
559 | 560 |
560 rmap.connect('repo_settings_home', '/{repo_name:.*?}/settings', | 561 rmap.connect('repo_settings_home', '/{repo_name:.*?}/settings', |
561 controller='settings', action='index', | 562 controller='settings', action='index', |
562 conditions=dict(function=check_repo)) | 563 conditions=dict(function=check_repo)) |
563 | 564 |
565 rmap.connect('toggle_locking', "/{repo_name:.*?}/locking_toggle", | |
566 controller='settings', action="toggle_locking", | |
567 conditions=dict(method=["GET"], function=check_repo)) | |
568 | |
564 rmap.connect('repo_fork_create_home', '/{repo_name:.*?}/fork', | 569 rmap.connect('repo_fork_create_home', '/{repo_name:.*?}/fork', |
565 controller='forks', action='fork_create', | 570 controller='forks', action='fork_create', |
566 conditions=dict(function=check_repo, method=["POST"])) | 571 conditions=dict(function=check_repo, method=["POST"])) |
567 | 572 |
568 rmap.connect('repo_fork_home', '/{repo_name:.*?}/fork', | 573 rmap.connect('repo_fork_home', '/{repo_name:.*?}/fork', |