|
@@
-1,1089
+1,1151
b''
|
|
1
|
# -*- coding: utf-8 -*-
|
|
1
|
# -*- coding: utf-8 -*-
|
|
2
|
|
|
2
|
|
|
3
|
# Copyright (C) 2010-2016 RhodeCode GmbH
|
|
3
|
# Copyright (C) 2010-2016 RhodeCode GmbH
|
|
4
|
#
|
|
4
|
#
|
|
5
|
# This program is free software: you can redistribute it and/or modify
|
|
5
|
# This program is free software: you can redistribute it and/or modify
|
|
6
|
# it under the terms of the GNU Affero General Public License, version 3
|
|
6
|
# it under the terms of the GNU Affero General Public License, version 3
|
|
7
|
# (only), as published by the Free Software Foundation.
|
|
7
|
# (only), as published by the Free Software Foundation.
|
|
8
|
#
|
|
8
|
#
|
|
9
|
# This program is distributed in the hope that it will be useful,
|
|
9
|
# This program is distributed in the hope that it will be useful,
|
|
10
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
10
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
11
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
# GNU General Public License for more details.
|
|
12
|
# GNU General Public License for more details.
|
|
13
|
#
|
|
13
|
#
|
|
14
|
# You should have received a copy of the GNU Affero General Public License
|
|
14
|
# You should have received a copy of the GNU Affero General Public License
|
|
15
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
15
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
16
|
#
|
|
16
|
#
|
|
17
|
# This program is dual-licensed. If you wish to learn more about the
|
|
17
|
# This program is dual-licensed. If you wish to learn more about the
|
|
18
|
# RhodeCode Enterprise Edition, including its added features, Support services,
|
|
18
|
# RhodeCode Enterprise Edition, including its added features, Support services,
|
|
19
|
# and proprietary license terms, please see https://rhodecode.com/licenses/
|
|
19
|
# and proprietary license terms, please see https://rhodecode.com/licenses/
|
|
20
|
|
|
20
|
|
|
21
|
"""
|
|
21
|
"""
|
|
22
|
Routes configuration
|
|
22
|
Routes configuration
|
|
23
|
|
|
23
|
|
|
24
|
The more specific and detailed routes should be defined first so they
|
|
24
|
The more specific and detailed routes should be defined first so they
|
|
25
|
may take precedent over the more generic routes. For more information
|
|
25
|
may take precedent over the more generic routes. For more information
|
|
26
|
refer to the routes manual at http://routes.groovie.org/docs/
|
|
26
|
refer to the routes manual at http://routes.groovie.org/docs/
|
|
27
|
|
|
27
|
|
|
28
|
IMPORTANT: if you change any routing here, make sure to take a look at lib/base.py
|
|
28
|
IMPORTANT: if you change any routing here, make sure to take a look at lib/base.py
|
|
29
|
and _route_name variable which uses some of stored naming here to do redirects.
|
|
29
|
and _route_name variable which uses some of stored naming here to do redirects.
|
|
30
|
"""
|
|
30
|
"""
|
|
31
|
import os
|
|
31
|
import os
|
|
|
|
|
32
|
import re
|
|
32
|
from routes import Mapper
|
|
33
|
from routes import Mapper
|
|
33
|
|
|
34
|
|
|
34
|
from rhodecode.config import routing_links
|
|
35
|
from rhodecode.config import routing_links
|
|
35
|
|
|
36
|
|
|
36
|
# prefix for non repository related links needs to be prefixed with `/`
|
|
37
|
# prefix for non repository related links needs to be prefixed with `/`
|
|
37
|
ADMIN_PREFIX = '/_admin'
|
|
38
|
ADMIN_PREFIX = '/_admin'
|
|
38
|
|
|
39
|
|
|
39
|
# Default requirements for URL parts
|
|
40
|
# Default requirements for URL parts
|
|
40
|
URL_NAME_REQUIREMENTS = {
|
|
41
|
URL_NAME_REQUIREMENTS = {
|
|
41
|
# group name can have a slash in them, but they must not end with a slash
|
|
42
|
# group name can have a slash in them, but they must not end with a slash
|
|
42
|
'group_name': r'.*?[^/]',
|
|
43
|
'group_name': r'.*?[^/]',
|
|
43
|
# repo names can have a slash in them, but they must not end with a slash
|
|
44
|
# repo names can have a slash in them, but they must not end with a slash
|
|
44
|
'repo_name': r'.*?[^/]',
|
|
45
|
'repo_name': r'.*?[^/]',
|
|
45
|
# file path eats up everything at the end
|
|
46
|
# file path eats up everything at the end
|
|
46
|
'f_path': r'.*',
|
|
47
|
'f_path': r'.*',
|
|
47
|
# reference types
|
|
48
|
# reference types
|
|
48
|
'source_ref_type': '(branch|book|tag|rev|\%\(source_ref_type\)s)',
|
|
49
|
'source_ref_type': '(branch|book|tag|rev|\%\(source_ref_type\)s)',
|
|
49
|
'target_ref_type': '(branch|book|tag|rev|\%\(target_ref_type\)s)',
|
|
50
|
'target_ref_type': '(branch|book|tag|rev|\%\(target_ref_type\)s)',
|
|
50
|
}
|
|
51
|
}
|
|
51
|
|
|
52
|
|
|
52
|
|
|
53
|
|
|
|
|
|
54
|
class JSRoutesAwareMapper(Mapper):
|
|
|
|
|
55
|
"""
|
|
|
|
|
56
|
Wrapper for routes.Mapper to make pyroutes compatible url definitions
|
|
|
|
|
57
|
"""
|
|
|
|
|
58
|
_named_route_regex = re.compile(r'^[a-z-_0-9A-Z]+$')
|
|
|
|
|
59
|
_argument_prog = re.compile('\{(.*?)\}|:\((.*)\)')
|
|
|
|
|
60
|
def __init__(self, *args, **kw):
|
|
|
|
|
61
|
super(JSRoutesAwareMapper, self).__init__(*args, **kw)
|
|
|
|
|
62
|
self._jsroutes = []
|
|
|
|
|
63
|
|
|
|
|
|
64
|
def connect(self, *args, **kw):
|
|
|
|
|
65
|
"""
|
|
|
|
|
66
|
Wrapper for connect to take an extra argument jsroute=True
|
|
|
|
|
67
|
|
|
|
|
|
68
|
:param jsroute: boolean, if True will add the route to the pyroutes list
|
|
|
|
|
69
|
"""
|
|
|
|
|
70
|
if kw.pop('jsroute', False):
|
|
|
|
|
71
|
if not self._named_route_regex.match(args[0]):
|
|
|
|
|
72
|
# import pdb;pdb.set_trace()
|
|
|
|
|
73
|
raise Exception('only named routes can be added to pyroutes')
|
|
|
|
|
74
|
self._jsroutes.append(args[0])
|
|
|
|
|
75
|
|
|
|
|
|
76
|
super(JSRoutesAwareMapper, self).connect(*args, **kw)
|
|
|
|
|
77
|
|
|
|
|
|
78
|
def _extract_route_information(self, route):
|
|
|
|
|
79
|
"""
|
|
|
|
|
80
|
Convert a route into tuple(name, path, args), eg:
|
|
|
|
|
81
|
('user_profile', '/profile/%(username)s', ['username'])
|
|
|
|
|
82
|
"""
|
|
|
|
|
83
|
routepath = route.routepath
|
|
|
|
|
84
|
def replace(matchobj):
|
|
|
|
|
85
|
if matchobj.group(1):
|
|
|
|
|
86
|
return "%%(%s)s" % matchobj.group(1).split(':')[0]
|
|
|
|
|
87
|
else:
|
|
|
|
|
88
|
return "%%(%s)s" % matchobj.group(2)
|
|
|
|
|
89
|
|
|
|
|
|
90
|
routepath = self._argument_prog.sub(replace, routepath)
|
|
|
|
|
91
|
return (
|
|
|
|
|
92
|
route.name,
|
|
|
|
|
93
|
routepath,
|
|
|
|
|
94
|
[(arg[0].split(':')[0] if arg[0] != '' else arg[1])
|
|
|
|
|
95
|
for arg in self._argument_prog.findall(route.routepath)]
|
|
|
|
|
96
|
)
|
|
|
|
|
97
|
|
|
|
|
|
98
|
def jsroutes(self):
|
|
|
|
|
99
|
"""
|
|
|
|
|
100
|
Return a list of pyroutes.js compatible routes
|
|
|
|
|
101
|
"""
|
|
|
|
|
102
|
for route_name in self._jsroutes:
|
|
|
|
|
103
|
yield self._extract_route_information(self._routenames[route_name])
|
|
|
|
|
104
|
|
|
|
|
|
105
|
|
|
53
|
def make_map(config):
|
|
106
|
def make_map(config):
|
|
54
|
"""Create, configure and return the routes Mapper"""
|
|
107
|
"""Create, configure and return the routes Mapper"""
|
|
55
|
rmap = Mapper(directory=config['pylons.paths']['controllers'],
|
|
108
|
rmap = JSRoutesAwareMapper(directory=config['pylons.paths']['controllers'],
|
|
56
|
always_scan=config['debug'])
|
|
109
|
always_scan=config['debug'])
|
|
57
|
rmap.minimization = False
|
|
110
|
rmap.minimization = False
|
|
58
|
rmap.explicit = False
|
|
111
|
rmap.explicit = False
|
|
59
|
|
|
112
|
|
|
60
|
from rhodecode.lib.utils2 import str2bool
|
|
113
|
from rhodecode.lib.utils2 import str2bool
|
|
61
|
from rhodecode.model import repo, repo_group
|
|
114
|
from rhodecode.model import repo, repo_group
|
|
62
|
|
|
115
|
|
|
63
|
def check_repo(environ, match_dict):
|
|
116
|
def check_repo(environ, match_dict):
|
|
64
|
"""
|
|
117
|
"""
|
|
65
|
check for valid repository for proper 404 handling
|
|
118
|
check for valid repository for proper 404 handling
|
|
66
|
|
|
119
|
|
|
67
|
:param environ:
|
|
120
|
:param environ:
|
|
68
|
:param match_dict:
|
|
121
|
:param match_dict:
|
|
69
|
"""
|
|
122
|
"""
|
|
70
|
repo_name = match_dict.get('repo_name')
|
|
123
|
repo_name = match_dict.get('repo_name')
|
|
71
|
|
|
124
|
|
|
72
|
if match_dict.get('f_path'):
|
|
125
|
if match_dict.get('f_path'):
|
|
73
|
# fix for multiple initial slashes that causes errors
|
|
126
|
# fix for multiple initial slashes that causes errors
|
|
74
|
match_dict['f_path'] = match_dict['f_path'].lstrip('/')
|
|
127
|
match_dict['f_path'] = match_dict['f_path'].lstrip('/')
|
|
75
|
repo_model = repo.RepoModel()
|
|
128
|
repo_model = repo.RepoModel()
|
|
76
|
by_name_match = repo_model.get_by_repo_name(repo_name)
|
|
129
|
by_name_match = repo_model.get_by_repo_name(repo_name)
|
|
77
|
# if we match quickly from database, short circuit the operation,
|
|
130
|
# if we match quickly from database, short circuit the operation,
|
|
78
|
# and validate repo based on the type.
|
|
131
|
# and validate repo based on the type.
|
|
79
|
if by_name_match:
|
|
132
|
if by_name_match:
|
|
80
|
return True
|
|
133
|
return True
|
|
81
|
|
|
134
|
|
|
82
|
by_id_match = repo_model.get_repo_by_id(repo_name)
|
|
135
|
by_id_match = repo_model.get_repo_by_id(repo_name)
|
|
83
|
if by_id_match:
|
|
136
|
if by_id_match:
|
|
84
|
repo_name = by_id_match.repo_name
|
|
137
|
repo_name = by_id_match.repo_name
|
|
85
|
match_dict['repo_name'] = repo_name
|
|
138
|
match_dict['repo_name'] = repo_name
|
|
86
|
return True
|
|
139
|
return True
|
|
87
|
|
|
140
|
|
|
88
|
return False
|
|
141
|
return False
|
|
89
|
|
|
142
|
|
|
90
|
def check_group(environ, match_dict):
|
|
143
|
def check_group(environ, match_dict):
|
|
91
|
"""
|
|
144
|
"""
|
|
92
|
check for valid repository group path for proper 404 handling
|
|
145
|
check for valid repository group path for proper 404 handling
|
|
93
|
|
|
146
|
|
|
94
|
:param environ:
|
|
147
|
:param environ:
|
|
95
|
:param match_dict:
|
|
148
|
:param match_dict:
|
|
96
|
"""
|
|
149
|
"""
|
|
97
|
repo_group_name = match_dict.get('group_name')
|
|
150
|
repo_group_name = match_dict.get('group_name')
|
|
98
|
repo_group_model = repo_group.RepoGroupModel()
|
|
151
|
repo_group_model = repo_group.RepoGroupModel()
|
|
99
|
by_name_match = repo_group_model.get_by_group_name(repo_group_name)
|
|
152
|
by_name_match = repo_group_model.get_by_group_name(repo_group_name)
|
|
100
|
if by_name_match:
|
|
153
|
if by_name_match:
|
|
101
|
return True
|
|
154
|
return True
|
|
102
|
|
|
155
|
|
|
103
|
return False
|
|
156
|
return False
|
|
104
|
|
|
157
|
|
|
105
|
def check_user_group(environ, match_dict):
|
|
158
|
def check_user_group(environ, match_dict):
|
|
106
|
"""
|
|
159
|
"""
|
|
107
|
check for valid user group for proper 404 handling
|
|
160
|
check for valid user group for proper 404 handling
|
|
108
|
|
|
161
|
|
|
109
|
:param environ:
|
|
162
|
:param environ:
|
|
110
|
:param match_dict:
|
|
163
|
:param match_dict:
|
|
111
|
"""
|
|
164
|
"""
|
|
112
|
return True
|
|
165
|
return True
|
|
113
|
|
|
166
|
|
|
114
|
def check_int(environ, match_dict):
|
|
167
|
def check_int(environ, match_dict):
|
|
115
|
return match_dict.get('id').isdigit()
|
|
168
|
return match_dict.get('id').isdigit()
|
|
116
|
|
|
169
|
|
|
117
|
# The ErrorController route (handles 404/500 error pages); it should
|
|
170
|
# The ErrorController route (handles 404/500 error pages); it should
|
|
118
|
# likely stay at the top, ensuring it can always be resolved
|
|
171
|
# likely stay at the top, ensuring it can always be resolved
|
|
119
|
rmap.connect('/error/{action}', controller='error')
|
|
172
|
rmap.connect('/error/{action}', controller='error')
|
|
120
|
rmap.connect('/error/{action}/{id}', controller='error')
|
|
173
|
rmap.connect('/error/{action}/{id}', controller='error')
|
|
121
|
|
|
174
|
|
|
122
|
#==========================================================================
|
|
175
|
#==========================================================================
|
|
123
|
# CUSTOM ROUTES HERE
|
|
176
|
# CUSTOM ROUTES HERE
|
|
124
|
#==========================================================================
|
|
177
|
#==========================================================================
|
|
125
|
|
|
178
|
|
|
126
|
# MAIN PAGE
|
|
179
|
# MAIN PAGE
|
|
127
|
rmap.connect('home', '/', controller='home', action='index')
|
|
180
|
rmap.connect('home', '/', controller='home', action='index', jsroute=True)
|
|
128
|
rmap.connect('goto_switcher_data', '/_goto_data', controller='home',
|
|
181
|
rmap.connect('goto_switcher_data', '/_goto_data', controller='home',
|
|
129
|
action='goto_switcher_data')
|
|
182
|
action='goto_switcher_data')
|
|
130
|
rmap.connect('repo_list_data', '/_repos', controller='home',
|
|
183
|
rmap.connect('repo_list_data', '/_repos', controller='home',
|
|
131
|
action='repo_list_data')
|
|
184
|
action='repo_list_data')
|
|
132
|
|
|
185
|
|
|
133
|
rmap.connect('user_autocomplete_data', '/_users', controller='home',
|
|
186
|
rmap.connect('user_autocomplete_data', '/_users', controller='home',
|
|
134
|
action='user_autocomplete_data')
|
|
187
|
action='user_autocomplete_data', jsroute=True)
|
|
135
|
rmap.connect('user_group_autocomplete_data', '/_user_groups', controller='home',
|
|
188
|
rmap.connect('user_group_autocomplete_data', '/_user_groups', controller='home',
|
|
136
|
action='user_group_autocomplete_data')
|
|
189
|
action='user_group_autocomplete_data')
|
|
137
|
|
|
190
|
|
|
138
|
rmap.connect(
|
|
191
|
rmap.connect(
|
|
139
|
'user_profile', '/_profiles/{username}', controller='users',
|
|
192
|
'user_profile', '/_profiles/{username}', controller='users',
|
|
140
|
action='user_profile')
|
|
193
|
action='user_profile')
|
|
141
|
|
|
194
|
|
|
142
|
# TODO: johbo: Static links, to be replaced by our redirection mechanism
|
|
195
|
# TODO: johbo: Static links, to be replaced by our redirection mechanism
|
|
143
|
rmap.connect('rst_help',
|
|
196
|
rmap.connect('rst_help',
|
|
144
|
'http://docutils.sourceforge.net/docs/user/rst/quickref.html',
|
|
197
|
'http://docutils.sourceforge.net/docs/user/rst/quickref.html',
|
|
145
|
_static=True)
|
|
198
|
_static=True)
|
|
146
|
rmap.connect('markdown_help',
|
|
199
|
rmap.connect('markdown_help',
|
|
147
|
'http://daringfireball.net/projects/markdown/syntax',
|
|
200
|
'http://daringfireball.net/projects/markdown/syntax',
|
|
148
|
_static=True)
|
|
201
|
_static=True)
|
|
149
|
rmap.connect('rhodecode_official', 'https://rhodecode.com', _static=True)
|
|
202
|
rmap.connect('rhodecode_official', 'https://rhodecode.com', _static=True)
|
|
150
|
rmap.connect('rhodecode_support', 'https://rhodecode.com/help/', _static=True)
|
|
203
|
rmap.connect('rhodecode_support', 'https://rhodecode.com/help/', _static=True)
|
|
151
|
rmap.connect('rhodecode_translations', 'https://rhodecode.com/translate/enterprise', _static=True)
|
|
204
|
rmap.connect('rhodecode_translations', 'https://rhodecode.com/translate/enterprise', _static=True)
|
|
152
|
# TODO: anderson - making this a static link since redirect won't play
|
|
205
|
# TODO: anderson - making this a static link since redirect won't play
|
|
153
|
# nice with POST requests
|
|
206
|
# nice with POST requests
|
|
154
|
rmap.connect('enterprise_license_convert_from_old',
|
|
207
|
rmap.connect('enterprise_license_convert_from_old',
|
|
155
|
'https://rhodecode.com/u/license-upgrade',
|
|
208
|
'https://rhodecode.com/u/license-upgrade',
|
|
156
|
_static=True)
|
|
209
|
_static=True)
|
|
157
|
|
|
210
|
|
|
158
|
routing_links.connect_redirection_links(rmap)
|
|
211
|
routing_links.connect_redirection_links(rmap)
|
|
159
|
|
|
212
|
|
|
160
|
rmap.connect('ping', '%s/ping' % (ADMIN_PREFIX,), controller='home', action='ping')
|
|
213
|
rmap.connect('ping', '%s/ping' % (ADMIN_PREFIX,), controller='home', action='ping')
|
|
161
|
rmap.connect('error_test', '%s/error_test' % (ADMIN_PREFIX,), controller='home', action='error_test')
|
|
214
|
rmap.connect('error_test', '%s/error_test' % (ADMIN_PREFIX,), controller='home', action='error_test')
|
|
162
|
|
|
215
|
|
|
163
|
# ADMIN REPOSITORY ROUTES
|
|
216
|
# ADMIN REPOSITORY ROUTES
|
|
164
|
with rmap.submapper(path_prefix=ADMIN_PREFIX,
|
|
217
|
with rmap.submapper(path_prefix=ADMIN_PREFIX,
|
|
165
|
controller='admin/repos') as m:
|
|
218
|
controller='admin/repos') as m:
|
|
166
|
m.connect('repos', '/repos',
|
|
219
|
m.connect('repos', '/repos',
|
|
167
|
action='create', conditions={'method': ['POST']})
|
|
220
|
action='create', conditions={'method': ['POST']})
|
|
168
|
m.connect('repos', '/repos',
|
|
221
|
m.connect('repos', '/repos',
|
|
169
|
action='index', conditions={'method': ['GET']})
|
|
222
|
action='index', conditions={'method': ['GET']})
|
|
170
|
m.connect('new_repo', '/create_repository',
|
|
223
|
m.connect('new_repo', '/create_repository', jsroute=True,
|
|
171
|
action='create_repository', conditions={'method': ['GET']})
|
|
224
|
action='create_repository', conditions={'method': ['GET']})
|
|
172
|
m.connect('/repos/{repo_name}',
|
|
225
|
m.connect('/repos/{repo_name}',
|
|
173
|
action='update', conditions={'method': ['PUT'],
|
|
226
|
action='update', conditions={'method': ['PUT'],
|
|
174
|
'function': check_repo},
|
|
227
|
'function': check_repo},
|
|
175
|
requirements=URL_NAME_REQUIREMENTS)
|
|
228
|
requirements=URL_NAME_REQUIREMENTS)
|
|
176
|
m.connect('delete_repo', '/repos/{repo_name}',
|
|
229
|
m.connect('delete_repo', '/repos/{repo_name}',
|
|
177
|
action='delete', conditions={'method': ['DELETE']},
|
|
230
|
action='delete', conditions={'method': ['DELETE']},
|
|
178
|
requirements=URL_NAME_REQUIREMENTS)
|
|
231
|
requirements=URL_NAME_REQUIREMENTS)
|
|
179
|
m.connect('repo', '/repos/{repo_name}',
|
|
232
|
m.connect('repo', '/repos/{repo_name}',
|
|
180
|
action='show', conditions={'method': ['GET'],
|
|
233
|
action='show', conditions={'method': ['GET'],
|
|
181
|
'function': check_repo},
|
|
234
|
'function': check_repo},
|
|
182
|
requirements=URL_NAME_REQUIREMENTS)
|
|
235
|
requirements=URL_NAME_REQUIREMENTS)
|
|
183
|
|
|
236
|
|
|
184
|
# ADMIN REPOSITORY GROUPS ROUTES
|
|
237
|
# ADMIN REPOSITORY GROUPS ROUTES
|
|
185
|
with rmap.submapper(path_prefix=ADMIN_PREFIX,
|
|
238
|
with rmap.submapper(path_prefix=ADMIN_PREFIX,
|
|
186
|
controller='admin/repo_groups') as m:
|
|
239
|
controller='admin/repo_groups') as m:
|
|
187
|
m.connect('repo_groups', '/repo_groups',
|
|
240
|
m.connect('repo_groups', '/repo_groups',
|
|
188
|
action='create', conditions={'method': ['POST']})
|
|
241
|
action='create', conditions={'method': ['POST']})
|
|
189
|
m.connect('repo_groups', '/repo_groups',
|
|
242
|
m.connect('repo_groups', '/repo_groups',
|
|
190
|
action='index', conditions={'method': ['GET']})
|
|
243
|
action='index', conditions={'method': ['GET']})
|
|
191
|
m.connect('new_repo_group', '/repo_groups/new',
|
|
244
|
m.connect('new_repo_group', '/repo_groups/new',
|
|
192
|
action='new', conditions={'method': ['GET']})
|
|
245
|
action='new', conditions={'method': ['GET']})
|
|
193
|
m.connect('update_repo_group', '/repo_groups/{group_name}',
|
|
246
|
m.connect('update_repo_group', '/repo_groups/{group_name}',
|
|
194
|
action='update', conditions={'method': ['PUT'],
|
|
247
|
action='update', conditions={'method': ['PUT'],
|
|
195
|
'function': check_group},
|
|
248
|
'function': check_group},
|
|
196
|
requirements=URL_NAME_REQUIREMENTS)
|
|
249
|
requirements=URL_NAME_REQUIREMENTS)
|
|
197
|
|
|
250
|
|
|
198
|
# EXTRAS REPO GROUP ROUTES
|
|
251
|
# EXTRAS REPO GROUP ROUTES
|
|
199
|
m.connect('edit_repo_group', '/repo_groups/{group_name}/edit',
|
|
252
|
m.connect('edit_repo_group', '/repo_groups/{group_name}/edit',
|
|
200
|
action='edit',
|
|
253
|
action='edit',
|
|
201
|
conditions={'method': ['GET'], 'function': check_group},
|
|
254
|
conditions={'method': ['GET'], 'function': check_group},
|
|
202
|
requirements=URL_NAME_REQUIREMENTS)
|
|
255
|
requirements=URL_NAME_REQUIREMENTS)
|
|
203
|
m.connect('edit_repo_group', '/repo_groups/{group_name}/edit',
|
|
256
|
m.connect('edit_repo_group', '/repo_groups/{group_name}/edit',
|
|
204
|
action='edit',
|
|
257
|
action='edit',
|
|
205
|
conditions={'method': ['PUT'], 'function': check_group},
|
|
258
|
conditions={'method': ['PUT'], 'function': check_group},
|
|
206
|
requirements=URL_NAME_REQUIREMENTS)
|
|
259
|
requirements=URL_NAME_REQUIREMENTS)
|
|
207
|
|
|
260
|
|
|
208
|
m.connect('edit_repo_group_advanced', '/repo_groups/{group_name}/edit/advanced',
|
|
261
|
m.connect('edit_repo_group_advanced', '/repo_groups/{group_name}/edit/advanced',
|
|
209
|
action='edit_repo_group_advanced',
|
|
262
|
action='edit_repo_group_advanced',
|
|
210
|
conditions={'method': ['GET'], 'function': check_group},
|
|
263
|
conditions={'method': ['GET'], 'function': check_group},
|
|
211
|
requirements=URL_NAME_REQUIREMENTS)
|
|
264
|
requirements=URL_NAME_REQUIREMENTS)
|
|
212
|
m.connect('edit_repo_group_advanced', '/repo_groups/{group_name}/edit/advanced',
|
|
265
|
m.connect('edit_repo_group_advanced', '/repo_groups/{group_name}/edit/advanced',
|
|
213
|
action='edit_repo_group_advanced',
|
|
266
|
action='edit_repo_group_advanced',
|
|
214
|
conditions={'method': ['PUT'], 'function': check_group},
|
|
267
|
conditions={'method': ['PUT'], 'function': check_group},
|
|
215
|
requirements=URL_NAME_REQUIREMENTS)
|
|
268
|
requirements=URL_NAME_REQUIREMENTS)
|
|
216
|
|
|
269
|
|
|
217
|
m.connect('edit_repo_group_perms', '/repo_groups/{group_name}/edit/permissions',
|
|
270
|
m.connect('edit_repo_group_perms', '/repo_groups/{group_name}/edit/permissions',
|
|
218
|
action='edit_repo_group_perms',
|
|
271
|
action='edit_repo_group_perms',
|
|
219
|
conditions={'method': ['GET'], 'function': check_group},
|
|
272
|
conditions={'method': ['GET'], 'function': check_group},
|
|
220
|
requirements=URL_NAME_REQUIREMENTS)
|
|
273
|
requirements=URL_NAME_REQUIREMENTS)
|
|
221
|
m.connect('edit_repo_group_perms', '/repo_groups/{group_name}/edit/permissions',
|
|
274
|
m.connect('edit_repo_group_perms', '/repo_groups/{group_name}/edit/permissions',
|
|
222
|
action='update_perms',
|
|
275
|
action='update_perms',
|
|
223
|
conditions={'method': ['PUT'], 'function': check_group},
|
|
276
|
conditions={'method': ['PUT'], 'function': check_group},
|
|
224
|
requirements=URL_NAME_REQUIREMENTS)
|
|
277
|
requirements=URL_NAME_REQUIREMENTS)
|
|
225
|
|
|
278
|
|
|
226
|
m.connect('delete_repo_group', '/repo_groups/{group_name}',
|
|
279
|
m.connect('delete_repo_group', '/repo_groups/{group_name}',
|
|
227
|
action='delete', conditions={'method': ['DELETE'],
|
|
280
|
action='delete', conditions={'method': ['DELETE'],
|
|
228
|
'function': check_group},
|
|
281
|
'function': check_group},
|
|
229
|
requirements=URL_NAME_REQUIREMENTS)
|
|
282
|
requirements=URL_NAME_REQUIREMENTS)
|
|
230
|
|
|
283
|
|
|
231
|
# ADMIN USER ROUTES
|
|
284
|
# ADMIN USER ROUTES
|
|
232
|
with rmap.submapper(path_prefix=ADMIN_PREFIX,
|
|
285
|
with rmap.submapper(path_prefix=ADMIN_PREFIX,
|
|
233
|
controller='admin/users') as m:
|
|
286
|
controller='admin/users') as m:
|
|
234
|
m.connect('users', '/users',
|
|
287
|
m.connect('users', '/users',
|
|
235
|
action='create', conditions={'method': ['POST']})
|
|
288
|
action='create', conditions={'method': ['POST']})
|
|
236
|
m.connect('users', '/users',
|
|
289
|
m.connect('users', '/users',
|
|
237
|
action='index', conditions={'method': ['GET']})
|
|
290
|
action='index', conditions={'method': ['GET']})
|
|
238
|
m.connect('new_user', '/users/new',
|
|
291
|
m.connect('new_user', '/users/new',
|
|
239
|
action='new', conditions={'method': ['GET']})
|
|
292
|
action='new', conditions={'method': ['GET']})
|
|
240
|
m.connect('update_user', '/users/{user_id}',
|
|
293
|
m.connect('update_user', '/users/{user_id}',
|
|
241
|
action='update', conditions={'method': ['PUT']})
|
|
294
|
action='update', conditions={'method': ['PUT']})
|
|
242
|
m.connect('delete_user', '/users/{user_id}',
|
|
295
|
m.connect('delete_user', '/users/{user_id}',
|
|
243
|
action='delete', conditions={'method': ['DELETE']})
|
|
296
|
action='delete', conditions={'method': ['DELETE']})
|
|
244
|
m.connect('edit_user', '/users/{user_id}/edit',
|
|
297
|
m.connect('edit_user', '/users/{user_id}/edit',
|
|
245
|
action='edit', conditions={'method': ['GET']})
|
|
298
|
action='edit', conditions={'method': ['GET']})
|
|
246
|
m.connect('user', '/users/{user_id}',
|
|
299
|
m.connect('user', '/users/{user_id}',
|
|
247
|
action='show', conditions={'method': ['GET']})
|
|
300
|
action='show', conditions={'method': ['GET']})
|
|
248
|
m.connect('force_password_reset_user', '/users/{user_id}/password_reset',
|
|
301
|
m.connect('force_password_reset_user', '/users/{user_id}/password_reset',
|
|
249
|
action='reset_password', conditions={'method': ['POST']})
|
|
302
|
action='reset_password', conditions={'method': ['POST']})
|
|
250
|
m.connect('create_personal_repo_group', '/users/{user_id}/create_repo_group',
|
|
303
|
m.connect('create_personal_repo_group', '/users/{user_id}/create_repo_group',
|
|
251
|
action='create_personal_repo_group', conditions={'method': ['POST']})
|
|
304
|
action='create_personal_repo_group', conditions={'method': ['POST']})
|
|
252
|
|
|
305
|
|
|
253
|
# EXTRAS USER ROUTES
|
|
306
|
# EXTRAS USER ROUTES
|
|
254
|
m.connect('edit_user_advanced', '/users/{user_id}/edit/advanced',
|
|
307
|
m.connect('edit_user_advanced', '/users/{user_id}/edit/advanced',
|
|
255
|
action='edit_advanced', conditions={'method': ['GET']})
|
|
308
|
action='edit_advanced', conditions={'method': ['GET']})
|
|
256
|
m.connect('edit_user_advanced', '/users/{user_id}/edit/advanced',
|
|
309
|
m.connect('edit_user_advanced', '/users/{user_id}/edit/advanced',
|
|
257
|
action='update_advanced', conditions={'method': ['PUT']})
|
|
310
|
action='update_advanced', conditions={'method': ['PUT']})
|
|
258
|
|
|
311
|
|
|
259
|
m.connect('edit_user_auth_tokens', '/users/{user_id}/edit/auth_tokens',
|
|
312
|
m.connect('edit_user_auth_tokens', '/users/{user_id}/edit/auth_tokens',
|
|
260
|
action='edit_auth_tokens', conditions={'method': ['GET']})
|
|
313
|
action='edit_auth_tokens', conditions={'method': ['GET']})
|
|
261
|
m.connect('edit_user_auth_tokens', '/users/{user_id}/edit/auth_tokens',
|
|
314
|
m.connect('edit_user_auth_tokens', '/users/{user_id}/edit/auth_tokens',
|
|
262
|
action='add_auth_token', conditions={'method': ['PUT']})
|
|
315
|
action='add_auth_token', conditions={'method': ['PUT']})
|
|
263
|
m.connect('edit_user_auth_tokens', '/users/{user_id}/edit/auth_tokens',
|
|
316
|
m.connect('edit_user_auth_tokens', '/users/{user_id}/edit/auth_tokens',
|
|
264
|
action='delete_auth_token', conditions={'method': ['DELETE']})
|
|
317
|
action='delete_auth_token', conditions={'method': ['DELETE']})
|
|
265
|
|
|
318
|
|
|
266
|
m.connect('edit_user_global_perms', '/users/{user_id}/edit/global_permissions',
|
|
319
|
m.connect('edit_user_global_perms', '/users/{user_id}/edit/global_permissions',
|
|
267
|
action='edit_global_perms', conditions={'method': ['GET']})
|
|
320
|
action='edit_global_perms', conditions={'method': ['GET']})
|
|
268
|
m.connect('edit_user_global_perms', '/users/{user_id}/edit/global_permissions',
|
|
321
|
m.connect('edit_user_global_perms', '/users/{user_id}/edit/global_permissions',
|
|
269
|
action='update_global_perms', conditions={'method': ['PUT']})
|
|
322
|
action='update_global_perms', conditions={'method': ['PUT']})
|
|
270
|
|
|
323
|
|
|
271
|
m.connect('edit_user_perms_summary', '/users/{user_id}/edit/permissions_summary',
|
|
324
|
m.connect('edit_user_perms_summary', '/users/{user_id}/edit/permissions_summary',
|
|
272
|
action='edit_perms_summary', conditions={'method': ['GET']})
|
|
325
|
action='edit_perms_summary', conditions={'method': ['GET']})
|
|
273
|
|
|
326
|
|
|
274
|
m.connect('edit_user_emails', '/users/{user_id}/edit/emails',
|
|
327
|
m.connect('edit_user_emails', '/users/{user_id}/edit/emails',
|
|
275
|
action='edit_emails', conditions={'method': ['GET']})
|
|
328
|
action='edit_emails', conditions={'method': ['GET']})
|
|
276
|
m.connect('edit_user_emails', '/users/{user_id}/edit/emails',
|
|
329
|
m.connect('edit_user_emails', '/users/{user_id}/edit/emails',
|
|
277
|
action='add_email', conditions={'method': ['PUT']})
|
|
330
|
action='add_email', conditions={'method': ['PUT']})
|
|
278
|
m.connect('edit_user_emails', '/users/{user_id}/edit/emails',
|
|
331
|
m.connect('edit_user_emails', '/users/{user_id}/edit/emails',
|
|
279
|
action='delete_email', conditions={'method': ['DELETE']})
|
|
332
|
action='delete_email', conditions={'method': ['DELETE']})
|
|
280
|
|
|
333
|
|
|
281
|
m.connect('edit_user_ips', '/users/{user_id}/edit/ips',
|
|
334
|
m.connect('edit_user_ips', '/users/{user_id}/edit/ips',
|
|
282
|
action='edit_ips', conditions={'method': ['GET']})
|
|
335
|
action='edit_ips', conditions={'method': ['GET']})
|
|
283
|
m.connect('edit_user_ips', '/users/{user_id}/edit/ips',
|
|
336
|
m.connect('edit_user_ips', '/users/{user_id}/edit/ips',
|
|
284
|
action='add_ip', conditions={'method': ['PUT']})
|
|
337
|
action='add_ip', conditions={'method': ['PUT']})
|
|
285
|
m.connect('edit_user_ips', '/users/{user_id}/edit/ips',
|
|
338
|
m.connect('edit_user_ips', '/users/{user_id}/edit/ips',
|
|
286
|
action='delete_ip', conditions={'method': ['DELETE']})
|
|
339
|
action='delete_ip', conditions={'method': ['DELETE']})
|
|
287
|
|
|
340
|
|
|
288
|
# ADMIN USER GROUPS REST ROUTES
|
|
341
|
# ADMIN USER GROUPS REST ROUTES
|
|
289
|
with rmap.submapper(path_prefix=ADMIN_PREFIX,
|
|
342
|
with rmap.submapper(path_prefix=ADMIN_PREFIX,
|
|
290
|
controller='admin/user_groups') as m:
|
|
343
|
controller='admin/user_groups') as m:
|
|
291
|
m.connect('users_groups', '/user_groups',
|
|
344
|
m.connect('users_groups', '/user_groups',
|
|
292
|
action='create', conditions={'method': ['POST']})
|
|
345
|
action='create', conditions={'method': ['POST']})
|
|
293
|
m.connect('users_groups', '/user_groups',
|
|
346
|
m.connect('users_groups', '/user_groups',
|
|
294
|
action='index', conditions={'method': ['GET']})
|
|
347
|
action='index', conditions={'method': ['GET']})
|
|
295
|
m.connect('new_users_group', '/user_groups/new',
|
|
348
|
m.connect('new_users_group', '/user_groups/new',
|
|
296
|
action='new', conditions={'method': ['GET']})
|
|
349
|
action='new', conditions={'method': ['GET']})
|
|
297
|
m.connect('update_users_group', '/user_groups/{user_group_id}',
|
|
350
|
m.connect('update_users_group', '/user_groups/{user_group_id}',
|
|
298
|
action='update', conditions={'method': ['PUT']})
|
|
351
|
action='update', conditions={'method': ['PUT']})
|
|
299
|
m.connect('delete_users_group', '/user_groups/{user_group_id}',
|
|
352
|
m.connect('delete_users_group', '/user_groups/{user_group_id}',
|
|
300
|
action='delete', conditions={'method': ['DELETE']})
|
|
353
|
action='delete', conditions={'method': ['DELETE']})
|
|
301
|
m.connect('edit_users_group', '/user_groups/{user_group_id}/edit',
|
|
354
|
m.connect('edit_users_group', '/user_groups/{user_group_id}/edit',
|
|
302
|
action='edit', conditions={'method': ['GET']},
|
|
355
|
action='edit', conditions={'method': ['GET']},
|
|
303
|
function=check_user_group)
|
|
356
|
function=check_user_group)
|
|
304
|
|
|
357
|
|
|
305
|
# EXTRAS USER GROUP ROUTES
|
|
358
|
# EXTRAS USER GROUP ROUTES
|
|
306
|
m.connect('edit_user_group_global_perms', '/user_groups/{user_group_id}/edit/global_permissions',
|
|
359
|
m.connect('edit_user_group_global_perms',
|
|
|
|
|
360
|
'/user_groups/{user_group_id}/edit/global_permissions',
|
|
307
|
action='edit_global_perms', conditions={'method': ['GET']})
|
|
361
|
action='edit_global_perms', conditions={'method': ['GET']})
|
|
308
|
m.connect('edit_user_group_global_perms', '/user_groups/{user_group_id}/edit/global_permissions',
|
|
362
|
m.connect('edit_user_group_global_perms',
|
|
|
|
|
363
|
'/user_groups/{user_group_id}/edit/global_permissions',
|
|
309
|
action='update_global_perms', conditions={'method': ['PUT']})
|
|
364
|
action='update_global_perms', conditions={'method': ['PUT']})
|
|
310
|
m.connect('edit_user_group_perms_summary', '/user_groups/{user_group_id}/edit/permissions_summary',
|
|
365
|
m.connect('edit_user_group_perms_summary',
|
|
|
|
|
366
|
'/user_groups/{user_group_id}/edit/permissions_summary',
|
|
311
|
action='edit_perms_summary', conditions={'method': ['GET']})
|
|
367
|
action='edit_perms_summary', conditions={'method': ['GET']})
|
|
312
|
|
|
368
|
|
|
313
|
m.connect('edit_user_group_perms', '/user_groups/{user_group_id}/edit/permissions',
|
|
369
|
m.connect('edit_user_group_perms',
|
|
|
|
|
370
|
'/user_groups/{user_group_id}/edit/permissions',
|
|
314
|
action='edit_perms', conditions={'method': ['GET']})
|
|
371
|
action='edit_perms', conditions={'method': ['GET']})
|
|
315
|
m.connect('edit_user_group_perms', '/user_groups/{user_group_id}/edit/permissions',
|
|
372
|
m.connect('edit_user_group_perms',
|
|
|
|
|
373
|
'/user_groups/{user_group_id}/edit/permissions',
|
|
316
|
action='update_perms', conditions={'method': ['PUT']})
|
|
374
|
action='update_perms', conditions={'method': ['PUT']})
|
|
317
|
|
|
375
|
|
|
318
|
m.connect('edit_user_group_advanced', '/user_groups/{user_group_id}/edit/advanced',
|
|
376
|
m.connect('edit_user_group_advanced',
|
|
|
|
|
377
|
'/user_groups/{user_group_id}/edit/advanced',
|
|
319
|
action='edit_advanced', conditions={'method': ['GET']})
|
|
378
|
action='edit_advanced', conditions={'method': ['GET']})
|
|
320
|
|
|
379
|
|
|
321
|
m.connect('edit_user_group_members', '/user_groups/{user_group_id}/edit/members',
|
|
380
|
m.connect('edit_user_group_members',
|
|
|
|
|
381
|
'/user_groups/{user_group_id}/edit/members', jsroute=True,
|
|
322
|
action='edit_members', conditions={'method': ['GET']})
|
|
382
|
action='edit_members', conditions={'method': ['GET']})
|
|
323
|
|
|
383
|
|
|
324
|
# ADMIN PERMISSIONS ROUTES
|
|
384
|
# ADMIN PERMISSIONS ROUTES
|
|
325
|
with rmap.submapper(path_prefix=ADMIN_PREFIX,
|
|
385
|
with rmap.submapper(path_prefix=ADMIN_PREFIX,
|
|
326
|
controller='admin/permissions') as m:
|
|
386
|
controller='admin/permissions') as m:
|
|
327
|
m.connect('admin_permissions_application', '/permissions/application',
|
|
387
|
m.connect('admin_permissions_application', '/permissions/application',
|
|
328
|
action='permission_application_update', conditions={'method': ['POST']})
|
|
388
|
action='permission_application_update', conditions={'method': ['POST']})
|
|
329
|
m.connect('admin_permissions_application', '/permissions/application',
|
|
389
|
m.connect('admin_permissions_application', '/permissions/application',
|
|
330
|
action='permission_application', conditions={'method': ['GET']})
|
|
390
|
action='permission_application', conditions={'method': ['GET']})
|
|
331
|
|
|
391
|
|
|
332
|
m.connect('admin_permissions_global', '/permissions/global',
|
|
392
|
m.connect('admin_permissions_global', '/permissions/global',
|
|
333
|
action='permission_global_update', conditions={'method': ['POST']})
|
|
393
|
action='permission_global_update', conditions={'method': ['POST']})
|
|
334
|
m.connect('admin_permissions_global', '/permissions/global',
|
|
394
|
m.connect('admin_permissions_global', '/permissions/global',
|
|
335
|
action='permission_global', conditions={'method': ['GET']})
|
|
395
|
action='permission_global', conditions={'method': ['GET']})
|
|
336
|
|
|
396
|
|
|
337
|
m.connect('admin_permissions_object', '/permissions/object',
|
|
397
|
m.connect('admin_permissions_object', '/permissions/object',
|
|
338
|
action='permission_objects_update', conditions={'method': ['POST']})
|
|
398
|
action='permission_objects_update', conditions={'method': ['POST']})
|
|
339
|
m.connect('admin_permissions_object', '/permissions/object',
|
|
399
|
m.connect('admin_permissions_object', '/permissions/object',
|
|
340
|
action='permission_objects', conditions={'method': ['GET']})
|
|
400
|
action='permission_objects', conditions={'method': ['GET']})
|
|
341
|
|
|
401
|
|
|
342
|
m.connect('admin_permissions_ips', '/permissions/ips',
|
|
402
|
m.connect('admin_permissions_ips', '/permissions/ips',
|
|
343
|
action='permission_ips', conditions={'method': ['POST']})
|
|
403
|
action='permission_ips', conditions={'method': ['POST']})
|
|
344
|
m.connect('admin_permissions_ips', '/permissions/ips',
|
|
404
|
m.connect('admin_permissions_ips', '/permissions/ips',
|
|
345
|
action='permission_ips', conditions={'method': ['GET']})
|
|
405
|
action='permission_ips', conditions={'method': ['GET']})
|
|
346
|
|
|
406
|
|
|
347
|
m.connect('admin_permissions_overview', '/permissions/overview',
|
|
407
|
m.connect('admin_permissions_overview', '/permissions/overview',
|
|
348
|
action='permission_perms', conditions={'method': ['GET']})
|
|
408
|
action='permission_perms', conditions={'method': ['GET']})
|
|
349
|
|
|
409
|
|
|
350
|
# ADMIN DEFAULTS REST ROUTES
|
|
410
|
# ADMIN DEFAULTS REST ROUTES
|
|
351
|
with rmap.submapper(path_prefix=ADMIN_PREFIX,
|
|
411
|
with rmap.submapper(path_prefix=ADMIN_PREFIX,
|
|
352
|
controller='admin/defaults') as m:
|
|
412
|
controller='admin/defaults') as m:
|
|
353
|
m.connect('admin_defaults_repositories', '/defaults/repositories',
|
|
413
|
m.connect('admin_defaults_repositories', '/defaults/repositories',
|
|
354
|
action='update_repository_defaults', conditions={'method': ['POST']})
|
|
414
|
action='update_repository_defaults', conditions={'method': ['POST']})
|
|
355
|
m.connect('admin_defaults_repositories', '/defaults/repositories',
|
|
415
|
m.connect('admin_defaults_repositories', '/defaults/repositories',
|
|
356
|
action='index', conditions={'method': ['GET']})
|
|
416
|
action='index', conditions={'method': ['GET']})
|
|
357
|
|
|
417
|
|
|
358
|
# ADMIN DEBUG STYLE ROUTES
|
|
418
|
# ADMIN DEBUG STYLE ROUTES
|
|
359
|
if str2bool(config.get('debug_style')):
|
|
419
|
if str2bool(config.get('debug_style')):
|
|
360
|
with rmap.submapper(path_prefix=ADMIN_PREFIX + '/debug_style',
|
|
420
|
with rmap.submapper(path_prefix=ADMIN_PREFIX + '/debug_style',
|
|
361
|
controller='debug_style') as m:
|
|
421
|
controller='debug_style') as m:
|
|
362
|
m.connect('debug_style_home', '',
|
|
422
|
m.connect('debug_style_home', '',
|
|
363
|
action='index', conditions={'method': ['GET']})
|
|
423
|
action='index', conditions={'method': ['GET']})
|
|
364
|
m.connect('debug_style_template', '/t/{t_path}',
|
|
424
|
m.connect('debug_style_template', '/t/{t_path}',
|
|
365
|
action='template', conditions={'method': ['GET']})
|
|
425
|
action='template', conditions={'method': ['GET']})
|
|
366
|
|
|
426
|
|
|
367
|
# ADMIN SETTINGS ROUTES
|
|
427
|
# ADMIN SETTINGS ROUTES
|
|
368
|
with rmap.submapper(path_prefix=ADMIN_PREFIX,
|
|
428
|
with rmap.submapper(path_prefix=ADMIN_PREFIX,
|
|
369
|
controller='admin/settings') as m:
|
|
429
|
controller='admin/settings') as m:
|
|
370
|
|
|
430
|
|
|
371
|
# default
|
|
431
|
# default
|
|
372
|
m.connect('admin_settings', '/settings',
|
|
432
|
m.connect('admin_settings', '/settings',
|
|
373
|
action='settings_global_update',
|
|
433
|
action='settings_global_update',
|
|
374
|
conditions={'method': ['POST']})
|
|
434
|
conditions={'method': ['POST']})
|
|
375
|
m.connect('admin_settings', '/settings',
|
|
435
|
m.connect('admin_settings', '/settings',
|
|
376
|
action='settings_global', conditions={'method': ['GET']})
|
|
436
|
action='settings_global', conditions={'method': ['GET']})
|
|
377
|
|
|
437
|
|
|
378
|
m.connect('admin_settings_vcs', '/settings/vcs',
|
|
438
|
m.connect('admin_settings_vcs', '/settings/vcs',
|
|
379
|
action='settings_vcs_update',
|
|
439
|
action='settings_vcs_update',
|
|
380
|
conditions={'method': ['POST']})
|
|
440
|
conditions={'method': ['POST']})
|
|
381
|
m.connect('admin_settings_vcs', '/settings/vcs',
|
|
441
|
m.connect('admin_settings_vcs', '/settings/vcs',
|
|
382
|
action='settings_vcs',
|
|
442
|
action='settings_vcs',
|
|
383
|
conditions={'method': ['GET']})
|
|
443
|
conditions={'method': ['GET']})
|
|
384
|
m.connect('admin_settings_vcs', '/settings/vcs',
|
|
444
|
m.connect('admin_settings_vcs', '/settings/vcs',
|
|
385
|
action='delete_svn_pattern',
|
|
445
|
action='delete_svn_pattern',
|
|
386
|
conditions={'method': ['DELETE']})
|
|
446
|
conditions={'method': ['DELETE']})
|
|
387
|
|
|
447
|
|
|
388
|
m.connect('admin_settings_mapping', '/settings/mapping',
|
|
448
|
m.connect('admin_settings_mapping', '/settings/mapping',
|
|
389
|
action='settings_mapping_update',
|
|
449
|
action='settings_mapping_update',
|
|
390
|
conditions={'method': ['POST']})
|
|
450
|
conditions={'method': ['POST']})
|
|
391
|
m.connect('admin_settings_mapping', '/settings/mapping',
|
|
451
|
m.connect('admin_settings_mapping', '/settings/mapping',
|
|
392
|
action='settings_mapping', conditions={'method': ['GET']})
|
|
452
|
action='settings_mapping', conditions={'method': ['GET']})
|
|
393
|
|
|
453
|
|
|
394
|
m.connect('admin_settings_global', '/settings/global',
|
|
454
|
m.connect('admin_settings_global', '/settings/global',
|
|
395
|
action='settings_global_update',
|
|
455
|
action='settings_global_update',
|
|
396
|
conditions={'method': ['POST']})
|
|
456
|
conditions={'method': ['POST']})
|
|
397
|
m.connect('admin_settings_global', '/settings/global',
|
|
457
|
m.connect('admin_settings_global', '/settings/global',
|
|
398
|
action='settings_global', conditions={'method': ['GET']})
|
|
458
|
action='settings_global', conditions={'method': ['GET']})
|
|
399
|
|
|
459
|
|
|
400
|
m.connect('admin_settings_visual', '/settings/visual',
|
|
460
|
m.connect('admin_settings_visual', '/settings/visual',
|
|
401
|
action='settings_visual_update',
|
|
461
|
action='settings_visual_update',
|
|
402
|
conditions={'method': ['POST']})
|
|
462
|
conditions={'method': ['POST']})
|
|
403
|
m.connect('admin_settings_visual', '/settings/visual',
|
|
463
|
m.connect('admin_settings_visual', '/settings/visual',
|
|
404
|
action='settings_visual', conditions={'method': ['GET']})
|
|
464
|
action='settings_visual', conditions={'method': ['GET']})
|
|
405
|
|
|
465
|
|
|
406
|
m.connect('admin_settings_issuetracker',
|
|
466
|
m.connect('admin_settings_issuetracker',
|
|
407
|
'/settings/issue-tracker', action='settings_issuetracker',
|
|
467
|
'/settings/issue-tracker', action='settings_issuetracker',
|
|
408
|
conditions={'method': ['GET']})
|
|
468
|
conditions={'method': ['GET']})
|
|
409
|
m.connect('admin_settings_issuetracker_save',
|
|
469
|
m.connect('admin_settings_issuetracker_save',
|
|
410
|
'/settings/issue-tracker/save',
|
|
470
|
'/settings/issue-tracker/save',
|
|
411
|
action='settings_issuetracker_save',
|
|
471
|
action='settings_issuetracker_save',
|
|
412
|
conditions={'method': ['POST']})
|
|
472
|
conditions={'method': ['POST']})
|
|
413
|
m.connect('admin_issuetracker_test', '/settings/issue-tracker/test',
|
|
473
|
m.connect('admin_issuetracker_test', '/settings/issue-tracker/test',
|
|
414
|
action='settings_issuetracker_test',
|
|
474
|
action='settings_issuetracker_test',
|
|
415
|
conditions={'method': ['POST']})
|
|
475
|
conditions={'method': ['POST']})
|
|
416
|
m.connect('admin_issuetracker_delete',
|
|
476
|
m.connect('admin_issuetracker_delete',
|
|
417
|
'/settings/issue-tracker/delete',
|
|
477
|
'/settings/issue-tracker/delete',
|
|
418
|
action='settings_issuetracker_delete',
|
|
478
|
action='settings_issuetracker_delete',
|
|
419
|
conditions={'method': ['DELETE']})
|
|
479
|
conditions={'method': ['DELETE']})
|
|
420
|
|
|
480
|
|
|
421
|
m.connect('admin_settings_email', '/settings/email',
|
|
481
|
m.connect('admin_settings_email', '/settings/email',
|
|
422
|
action='settings_email_update',
|
|
482
|
action='settings_email_update',
|
|
423
|
conditions={'method': ['POST']})
|
|
483
|
conditions={'method': ['POST']})
|
|
424
|
m.connect('admin_settings_email', '/settings/email',
|
|
484
|
m.connect('admin_settings_email', '/settings/email',
|
|
425
|
action='settings_email', conditions={'method': ['GET']})
|
|
485
|
action='settings_email', conditions={'method': ['GET']})
|
|
426
|
|
|
486
|
|
|
427
|
m.connect('admin_settings_hooks', '/settings/hooks',
|
|
487
|
m.connect('admin_settings_hooks', '/settings/hooks',
|
|
428
|
action='settings_hooks_update',
|
|
488
|
action='settings_hooks_update',
|
|
429
|
conditions={'method': ['POST', 'DELETE']})
|
|
489
|
conditions={'method': ['POST', 'DELETE']})
|
|
430
|
m.connect('admin_settings_hooks', '/settings/hooks',
|
|
490
|
m.connect('admin_settings_hooks', '/settings/hooks',
|
|
431
|
action='settings_hooks', conditions={'method': ['GET']})
|
|
491
|
action='settings_hooks', conditions={'method': ['GET']})
|
|
432
|
|
|
492
|
|
|
433
|
m.connect('admin_settings_search', '/settings/search',
|
|
493
|
m.connect('admin_settings_search', '/settings/search',
|
|
434
|
action='settings_search', conditions={'method': ['GET']})
|
|
494
|
action='settings_search', conditions={'method': ['GET']})
|
|
435
|
|
|
495
|
|
|
436
|
m.connect('admin_settings_system', '/settings/system',
|
|
496
|
m.connect('admin_settings_system', '/settings/system',
|
|
437
|
action='settings_system', conditions={'method': ['GET']})
|
|
497
|
action='settings_system', conditions={'method': ['GET']})
|
|
438
|
|
|
498
|
|
|
439
|
m.connect('admin_settings_system_update', '/settings/system/updates',
|
|
499
|
m.connect('admin_settings_system_update', '/settings/system/updates',
|
|
440
|
action='settings_system_update', conditions={'method': ['GET']})
|
|
500
|
action='settings_system_update', conditions={'method': ['GET']})
|
|
441
|
|
|
501
|
|
|
442
|
m.connect('admin_settings_supervisor', '/settings/supervisor',
|
|
502
|
m.connect('admin_settings_supervisor', '/settings/supervisor',
|
|
443
|
action='settings_supervisor', conditions={'method': ['GET']})
|
|
503
|
action='settings_supervisor', conditions={'method': ['GET']})
|
|
444
|
m.connect('admin_settings_supervisor_log', '/settings/supervisor/{procid}/log',
|
|
504
|
m.connect('admin_settings_supervisor_log', '/settings/supervisor/{procid}/log',
|
|
445
|
action='settings_supervisor_log', conditions={'method': ['GET']})
|
|
505
|
action='settings_supervisor_log', conditions={'method': ['GET']})
|
|
446
|
|
|
506
|
|
|
447
|
m.connect('admin_settings_labs', '/settings/labs',
|
|
507
|
m.connect('admin_settings_labs', '/settings/labs',
|
|
448
|
action='settings_labs_update',
|
|
508
|
action='settings_labs_update',
|
|
449
|
conditions={'method': ['POST']})
|
|
509
|
conditions={'method': ['POST']})
|
|
450
|
m.connect('admin_settings_labs', '/settings/labs',
|
|
510
|
m.connect('admin_settings_labs', '/settings/labs',
|
|
451
|
action='settings_labs', conditions={'method': ['GET']})
|
|
511
|
action='settings_labs', conditions={'method': ['GET']})
|
|
452
|
|
|
512
|
|
|
453
|
m.connect('admin_settings_open_source', '/settings/open_source',
|
|
513
|
m.connect('admin_settings_open_source', '/settings/open_source',
|
|
454
|
action='settings_open_source',
|
|
514
|
action='settings_open_source',
|
|
455
|
conditions={'method': ['GET']})
|
|
515
|
conditions={'method': ['GET']})
|
|
456
|
|
|
516
|
|
|
457
|
# ADMIN MY ACCOUNT
|
|
517
|
# ADMIN MY ACCOUNT
|
|
458
|
with rmap.submapper(path_prefix=ADMIN_PREFIX,
|
|
518
|
with rmap.submapper(path_prefix=ADMIN_PREFIX,
|
|
459
|
controller='admin/my_account') as m:
|
|
519
|
controller='admin/my_account') as m:
|
|
460
|
|
|
520
|
|
|
461
|
m.connect('my_account', '/my_account',
|
|
521
|
m.connect('my_account', '/my_account',
|
|
462
|
action='my_account', conditions={'method': ['GET']})
|
|
522
|
action='my_account', conditions={'method': ['GET']})
|
|
463
|
m.connect('my_account_edit', '/my_account/edit',
|
|
523
|
m.connect('my_account_edit', '/my_account/edit',
|
|
464
|
action='my_account_edit', conditions={'method': ['GET']})
|
|
524
|
action='my_account_edit', conditions={'method': ['GET']})
|
|
465
|
m.connect('my_account', '/my_account',
|
|
525
|
m.connect('my_account', '/my_account',
|
|
466
|
action='my_account_update', conditions={'method': ['POST']})
|
|
526
|
action='my_account_update', conditions={'method': ['POST']})
|
|
467
|
|
|
527
|
|
|
468
|
m.connect('my_account_password', '/my_account/password',
|
|
528
|
m.connect('my_account_password', '/my_account/password',
|
|
469
|
action='my_account_password', conditions={'method': ['GET']})
|
|
529
|
action='my_account_password', conditions={'method': ['GET']})
|
|
470
|
m.connect('my_account_password', '/my_account/password',
|
|
530
|
m.connect('my_account_password', '/my_account/password',
|
|
471
|
action='my_account_password_update', conditions={'method': ['POST']})
|
|
531
|
action='my_account_password_update', conditions={'method': ['POST']})
|
|
472
|
|
|
532
|
|
|
473
|
m.connect('my_account_repos', '/my_account/repos',
|
|
533
|
m.connect('my_account_repos', '/my_account/repos',
|
|
474
|
action='my_account_repos', conditions={'method': ['GET']})
|
|
534
|
action='my_account_repos', conditions={'method': ['GET']})
|
|
475
|
|
|
535
|
|
|
476
|
m.connect('my_account_watched', '/my_account/watched',
|
|
536
|
m.connect('my_account_watched', '/my_account/watched',
|
|
477
|
action='my_account_watched', conditions={'method': ['GET']})
|
|
537
|
action='my_account_watched', conditions={'method': ['GET']})
|
|
478
|
|
|
538
|
|
|
479
|
m.connect('my_account_pullrequests', '/my_account/pull_requests',
|
|
539
|
m.connect('my_account_pullrequests', '/my_account/pull_requests',
|
|
480
|
action='my_account_pullrequests', conditions={'method': ['GET']})
|
|
540
|
action='my_account_pullrequests', conditions={'method': ['GET']})
|
|
481
|
|
|
541
|
|
|
482
|
m.connect('my_account_perms', '/my_account/perms',
|
|
542
|
m.connect('my_account_perms', '/my_account/perms',
|
|
483
|
action='my_account_perms', conditions={'method': ['GET']})
|
|
543
|
action='my_account_perms', conditions={'method': ['GET']})
|
|
484
|
|
|
544
|
|
|
485
|
m.connect('my_account_emails', '/my_account/emails',
|
|
545
|
m.connect('my_account_emails', '/my_account/emails',
|
|
486
|
action='my_account_emails', conditions={'method': ['GET']})
|
|
546
|
action='my_account_emails', conditions={'method': ['GET']})
|
|
487
|
m.connect('my_account_emails', '/my_account/emails',
|
|
547
|
m.connect('my_account_emails', '/my_account/emails',
|
|
488
|
action='my_account_emails_add', conditions={'method': ['POST']})
|
|
548
|
action='my_account_emails_add', conditions={'method': ['POST']})
|
|
489
|
m.connect('my_account_emails', '/my_account/emails',
|
|
549
|
m.connect('my_account_emails', '/my_account/emails',
|
|
490
|
action='my_account_emails_delete', conditions={'method': ['DELETE']})
|
|
550
|
action='my_account_emails_delete', conditions={'method': ['DELETE']})
|
|
491
|
|
|
551
|
|
|
492
|
m.connect('my_account_auth_tokens', '/my_account/auth_tokens',
|
|
552
|
m.connect('my_account_auth_tokens', '/my_account/auth_tokens',
|
|
493
|
action='my_account_auth_tokens', conditions={'method': ['GET']})
|
|
553
|
action='my_account_auth_tokens', conditions={'method': ['GET']})
|
|
494
|
m.connect('my_account_auth_tokens', '/my_account/auth_tokens',
|
|
554
|
m.connect('my_account_auth_tokens', '/my_account/auth_tokens',
|
|
495
|
action='my_account_auth_tokens_add', conditions={'method': ['POST']})
|
|
555
|
action='my_account_auth_tokens_add', conditions={'method': ['POST']})
|
|
496
|
m.connect('my_account_auth_tokens', '/my_account/auth_tokens',
|
|
556
|
m.connect('my_account_auth_tokens', '/my_account/auth_tokens',
|
|
497
|
action='my_account_auth_tokens_delete', conditions={'method': ['DELETE']})
|
|
557
|
action='my_account_auth_tokens_delete', conditions={'method': ['DELETE']})
|
|
498
|
|
|
558
|
|
|
499
|
# NOTIFICATION REST ROUTES
|
|
559
|
# NOTIFICATION REST ROUTES
|
|
500
|
with rmap.submapper(path_prefix=ADMIN_PREFIX,
|
|
560
|
with rmap.submapper(path_prefix=ADMIN_PREFIX,
|
|
501
|
controller='admin/notifications') as m:
|
|
561
|
controller='admin/notifications') as m:
|
|
502
|
m.connect('notifications', '/notifications',
|
|
562
|
m.connect('notifications', '/notifications',
|
|
503
|
action='index', conditions={'method': ['GET']})
|
|
563
|
action='index', conditions={'method': ['GET']})
|
|
504
|
m.connect('notifications_mark_all_read', '/notifications/mark_all_read',
|
|
564
|
m.connect('notifications_mark_all_read', '/notifications/mark_all_read',
|
|
505
|
action='mark_all_read', conditions={'method': ['POST']})
|
|
565
|
action='mark_all_read', conditions={'method': ['POST']})
|
|
506
|
|
|
566
|
|
|
507
|
m.connect('/notifications/{notification_id}',
|
|
567
|
m.connect('/notifications/{notification_id}',
|
|
508
|
action='update', conditions={'method': ['PUT']})
|
|
568
|
action='update', conditions={'method': ['PUT']})
|
|
509
|
m.connect('/notifications/{notification_id}',
|
|
569
|
m.connect('/notifications/{notification_id}',
|
|
510
|
action='delete', conditions={'method': ['DELETE']})
|
|
570
|
action='delete', conditions={'method': ['DELETE']})
|
|
511
|
m.connect('notification', '/notifications/{notification_id}',
|
|
571
|
m.connect('notification', '/notifications/{notification_id}',
|
|
512
|
action='show', conditions={'method': ['GET']})
|
|
572
|
action='show', conditions={'method': ['GET']})
|
|
513
|
|
|
573
|
|
|
514
|
# ADMIN GIST
|
|
574
|
# ADMIN GIST
|
|
515
|
with rmap.submapper(path_prefix=ADMIN_PREFIX,
|
|
575
|
with rmap.submapper(path_prefix=ADMIN_PREFIX,
|
|
516
|
controller='admin/gists') as m:
|
|
576
|
controller='admin/gists') as m:
|
|
517
|
m.connect('gists', '/gists',
|
|
577
|
m.connect('gists', '/gists',
|
|
518
|
action='create', conditions={'method': ['POST']})
|
|
578
|
action='create', conditions={'method': ['POST']})
|
|
519
|
m.connect('gists', '/gists',
|
|
579
|
m.connect('gists', '/gists', jsroute=True,
|
|
520
|
action='index', conditions={'method': ['GET']})
|
|
580
|
action='index', conditions={'method': ['GET']})
|
|
521
|
m.connect('new_gist', '/gists/new',
|
|
581
|
m.connect('new_gist', '/gists/new', jsroute=True,
|
|
522
|
action='new', conditions={'method': ['GET']})
|
|
582
|
action='new', conditions={'method': ['GET']})
|
|
523
|
|
|
583
|
|
|
524
|
m.connect('/gists/{gist_id}',
|
|
584
|
m.connect('/gists/{gist_id}',
|
|
525
|
action='delete', conditions={'method': ['DELETE']})
|
|
585
|
action='delete', conditions={'method': ['DELETE']})
|
|
526
|
m.connect('edit_gist', '/gists/{gist_id}/edit',
|
|
586
|
m.connect('edit_gist', '/gists/{gist_id}/edit',
|
|
527
|
action='edit_form', conditions={'method': ['GET']})
|
|
587
|
action='edit_form', conditions={'method': ['GET']})
|
|
528
|
m.connect('edit_gist', '/gists/{gist_id}/edit',
|
|
588
|
m.connect('edit_gist', '/gists/{gist_id}/edit',
|
|
529
|
action='edit', conditions={'method': ['POST']})
|
|
589
|
action='edit', conditions={'method': ['POST']})
|
|
530
|
m.connect(
|
|
590
|
m.connect(
|
|
531
|
'edit_gist_check_revision', '/gists/{gist_id}/edit/check_revision',
|
|
591
|
'edit_gist_check_revision', '/gists/{gist_id}/edit/check_revision',
|
|
532
|
action='check_revision', conditions={'method': ['GET']})
|
|
592
|
action='check_revision', conditions={'method': ['GET']})
|
|
533
|
|
|
593
|
|
|
534
|
m.connect('gist', '/gists/{gist_id}',
|
|
594
|
m.connect('gist', '/gists/{gist_id}',
|
|
535
|
action='show', conditions={'method': ['GET']})
|
|
595
|
action='show', conditions={'method': ['GET']})
|
|
536
|
m.connect('gist_rev', '/gists/{gist_id}/{revision}',
|
|
596
|
m.connect('gist_rev', '/gists/{gist_id}/{revision}',
|
|
537
|
revision='tip',
|
|
597
|
revision='tip',
|
|
538
|
action='show', conditions={'method': ['GET']})
|
|
598
|
action='show', conditions={'method': ['GET']})
|
|
539
|
m.connect('formatted_gist', '/gists/{gist_id}/{revision}/{format}',
|
|
599
|
m.connect('formatted_gist', '/gists/{gist_id}/{revision}/{format}',
|
|
540
|
revision='tip',
|
|
600
|
revision='tip',
|
|
541
|
action='show', conditions={'method': ['GET']})
|
|
601
|
action='show', conditions={'method': ['GET']})
|
|
542
|
m.connect('formatted_gist_file', '/gists/{gist_id}/{revision}/{format}/{f_path}',
|
|
602
|
m.connect('formatted_gist_file', '/gists/{gist_id}/{revision}/{format}/{f_path}',
|
|
543
|
revision='tip',
|
|
603
|
revision='tip',
|
|
544
|
action='show', conditions={'method': ['GET']},
|
|
604
|
action='show', conditions={'method': ['GET']},
|
|
545
|
requirements=URL_NAME_REQUIREMENTS)
|
|
605
|
requirements=URL_NAME_REQUIREMENTS)
|
|
546
|
|
|
606
|
|
|
547
|
# ADMIN MAIN PAGES
|
|
607
|
# ADMIN MAIN PAGES
|
|
548
|
with rmap.submapper(path_prefix=ADMIN_PREFIX,
|
|
608
|
with rmap.submapper(path_prefix=ADMIN_PREFIX,
|
|
549
|
controller='admin/admin') as m:
|
|
609
|
controller='admin/admin') as m:
|
|
550
|
m.connect('admin_home', '', action='index')
|
|
610
|
m.connect('admin_home', '', action='index')
|
|
551
|
m.connect('admin_add_repo', '/add_repo/{new_repo:[a-z0-9\. _-]*}',
|
|
611
|
m.connect('admin_add_repo', '/add_repo/{new_repo:[a-z0-9\. _-]*}',
|
|
552
|
action='add_repo')
|
|
612
|
action='add_repo')
|
|
553
|
m.connect(
|
|
613
|
m.connect(
|
|
554
|
'pull_requests_global_0', '/pull_requests/{pull_request_id:[0-9]+}',
|
|
614
|
'pull_requests_global_0', '/pull_requests/{pull_request_id:[0-9]+}',
|
|
555
|
action='pull_requests')
|
|
615
|
action='pull_requests')
|
|
556
|
m.connect(
|
|
616
|
m.connect(
|
|
557
|
'pull_requests_global', '/pull-requests/{pull_request_id:[0-9]+}',
|
|
617
|
'pull_requests_global', '/pull-requests/{pull_request_id:[0-9]+}',
|
|
558
|
action='pull_requests')
|
|
618
|
action='pull_requests')
|
|
559
|
|
|
619
|
|
|
560
|
|
|
620
|
|
|
561
|
# USER JOURNAL
|
|
621
|
# USER JOURNAL
|
|
562
|
rmap.connect('journal', '%s/journal' % (ADMIN_PREFIX,),
|
|
622
|
rmap.connect('journal', '%s/journal' % (ADMIN_PREFIX,),
|
|
563
|
controller='journal', action='index')
|
|
623
|
controller='journal', action='index')
|
|
564
|
rmap.connect('journal_rss', '%s/journal/rss' % (ADMIN_PREFIX,),
|
|
624
|
rmap.connect('journal_rss', '%s/journal/rss' % (ADMIN_PREFIX,),
|
|
565
|
controller='journal', action='journal_rss')
|
|
625
|
controller='journal', action='journal_rss')
|
|
566
|
rmap.connect('journal_atom', '%s/journal/atom' % (ADMIN_PREFIX,),
|
|
626
|
rmap.connect('journal_atom', '%s/journal/atom' % (ADMIN_PREFIX,),
|
|
567
|
controller='journal', action='journal_atom')
|
|
627
|
controller='journal', action='journal_atom')
|
|
568
|
|
|
628
|
|
|
569
|
rmap.connect('public_journal', '%s/public_journal' % (ADMIN_PREFIX,),
|
|
629
|
rmap.connect('public_journal', '%s/public_journal' % (ADMIN_PREFIX,),
|
|
570
|
controller='journal', action='public_journal')
|
|
630
|
controller='journal', action='public_journal')
|
|
571
|
|
|
631
|
|
|
572
|
rmap.connect('public_journal_rss', '%s/public_journal/rss' % (ADMIN_PREFIX,),
|
|
632
|
rmap.connect('public_journal_rss', '%s/public_journal/rss' % (ADMIN_PREFIX,),
|
|
573
|
controller='journal', action='public_journal_rss')
|
|
633
|
controller='journal', action='public_journal_rss')
|
|
574
|
|
|
634
|
|
|
575
|
rmap.connect('public_journal_rss_old', '%s/public_journal_rss' % (ADMIN_PREFIX,),
|
|
635
|
rmap.connect('public_journal_rss_old', '%s/public_journal_rss' % (ADMIN_PREFIX,),
|
|
576
|
controller='journal', action='public_journal_rss')
|
|
636
|
controller='journal', action='public_journal_rss')
|
|
577
|
|
|
637
|
|
|
578
|
rmap.connect('public_journal_atom',
|
|
638
|
rmap.connect('public_journal_atom',
|
|
579
|
'%s/public_journal/atom' % (ADMIN_PREFIX,), controller='journal',
|
|
639
|
'%s/public_journal/atom' % (ADMIN_PREFIX,), controller='journal',
|
|
580
|
action='public_journal_atom')
|
|
640
|
action='public_journal_atom')
|
|
581
|
|
|
641
|
|
|
582
|
rmap.connect('public_journal_atom_old',
|
|
642
|
rmap.connect('public_journal_atom_old',
|
|
583
|
'%s/public_journal_atom' % (ADMIN_PREFIX,), controller='journal',
|
|
643
|
'%s/public_journal_atom' % (ADMIN_PREFIX,), controller='journal',
|
|
584
|
action='public_journal_atom')
|
|
644
|
action='public_journal_atom')
|
|
585
|
|
|
645
|
|
|
586
|
rmap.connect('toggle_following', '%s/toggle_following' % (ADMIN_PREFIX,),
|
|
646
|
rmap.connect('toggle_following', '%s/toggle_following' % (ADMIN_PREFIX,),
|
|
587
|
controller='journal', action='toggle_following',
|
|
647
|
controller='journal', action='toggle_following', jsroute=True,
|
|
588
|
conditions={'method': ['POST']})
|
|
648
|
conditions={'method': ['POST']})
|
|
589
|
|
|
649
|
|
|
590
|
# FULL TEXT SEARCH
|
|
650
|
# FULL TEXT SEARCH
|
|
591
|
rmap.connect('search', '%s/search' % (ADMIN_PREFIX,),
|
|
651
|
rmap.connect('search', '%s/search' % (ADMIN_PREFIX,),
|
|
592
|
controller='search')
|
|
652
|
controller='search')
|
|
593
|
rmap.connect('search_repo_home', '/{repo_name}/search',
|
|
653
|
rmap.connect('search_repo_home', '/{repo_name}/search',
|
|
594
|
controller='search',
|
|
654
|
controller='search',
|
|
595
|
action='index',
|
|
655
|
action='index',
|
|
596
|
conditions={'function': check_repo},
|
|
656
|
conditions={'function': check_repo},
|
|
597
|
requirements=URL_NAME_REQUIREMENTS)
|
|
657
|
requirements=URL_NAME_REQUIREMENTS)
|
|
598
|
|
|
658
|
|
|
599
|
# FEEDS
|
|
659
|
# FEEDS
|
|
600
|
rmap.connect('rss_feed_home', '/{repo_name}/feed/rss',
|
|
660
|
rmap.connect('rss_feed_home', '/{repo_name}/feed/rss',
|
|
601
|
controller='feed', action='rss',
|
|
661
|
controller='feed', action='rss',
|
|
602
|
conditions={'function': check_repo},
|
|
662
|
conditions={'function': check_repo},
|
|
603
|
requirements=URL_NAME_REQUIREMENTS)
|
|
663
|
requirements=URL_NAME_REQUIREMENTS)
|
|
604
|
|
|
664
|
|
|
605
|
rmap.connect('atom_feed_home', '/{repo_name}/feed/atom',
|
|
665
|
rmap.connect('atom_feed_home', '/{repo_name}/feed/atom',
|
|
606
|
controller='feed', action='atom',
|
|
666
|
controller='feed', action='atom',
|
|
607
|
conditions={'function': check_repo},
|
|
667
|
conditions={'function': check_repo},
|
|
608
|
requirements=URL_NAME_REQUIREMENTS)
|
|
668
|
requirements=URL_NAME_REQUIREMENTS)
|
|
609
|
|
|
669
|
|
|
610
|
#==========================================================================
|
|
670
|
#==========================================================================
|
|
611
|
# REPOSITORY ROUTES
|
|
671
|
# REPOSITORY ROUTES
|
|
612
|
#==========================================================================
|
|
672
|
#==========================================================================
|
|
613
|
|
|
673
|
|
|
614
|
rmap.connect('repo_creating_home', '/{repo_name}/repo_creating',
|
|
674
|
rmap.connect('repo_creating_home', '/{repo_name}/repo_creating',
|
|
615
|
controller='admin/repos', action='repo_creating',
|
|
675
|
controller='admin/repos', action='repo_creating',
|
|
616
|
requirements=URL_NAME_REQUIREMENTS)
|
|
676
|
requirements=URL_NAME_REQUIREMENTS)
|
|
617
|
rmap.connect('repo_check_home', '/{repo_name}/crepo_check',
|
|
677
|
rmap.connect('repo_check_home', '/{repo_name}/crepo_check',
|
|
618
|
controller='admin/repos', action='repo_check',
|
|
678
|
controller='admin/repos', action='repo_check',
|
|
619
|
requirements=URL_NAME_REQUIREMENTS)
|
|
679
|
requirements=URL_NAME_REQUIREMENTS)
|
|
620
|
|
|
680
|
|
|
621
|
rmap.connect('repo_stats', '/{repo_name}/repo_stats/{commit_id}',
|
|
681
|
rmap.connect('repo_stats', '/{repo_name}/repo_stats/{commit_id}',
|
|
622
|
controller='summary', action='repo_stats',
|
|
682
|
controller='summary', action='repo_stats',
|
|
623
|
conditions={'function': check_repo},
|
|
683
|
conditions={'function': check_repo},
|
|
624
|
requirements=URL_NAME_REQUIREMENTS)
|
|
684
|
requirements=URL_NAME_REQUIREMENTS, jsroute=True)
|
|
625
|
|
|
685
|
|
|
626
|
rmap.connect('repo_refs_data', '/{repo_name}/refs-data',
|
|
686
|
rmap.connect('repo_refs_data', '/{repo_name}/refs-data',
|
|
627
|
controller='summary', action='repo_refs_data',
|
|
687
|
controller='summary', action='repo_refs_data', jsroute=True,
|
|
628
|
requirements=URL_NAME_REQUIREMENTS)
|
|
688
|
requirements=URL_NAME_REQUIREMENTS)
|
|
629
|
rmap.connect('repo_refs_changelog_data', '/{repo_name}/refs-data-changelog',
|
|
689
|
rmap.connect('repo_refs_changelog_data', '/{repo_name}/refs-data-changelog',
|
|
630
|
controller='summary', action='repo_refs_changelog_data',
|
|
690
|
controller='summary', action='repo_refs_changelog_data',
|
|
631
|
requirements=URL_NAME_REQUIREMENTS)
|
|
691
|
requirements=URL_NAME_REQUIREMENTS, jsroute=True)
|
|
632
|
|
|
692
|
|
|
633
|
rmap.connect('changeset_home', '/{repo_name}/changeset/{revision}',
|
|
693
|
rmap.connect('changeset_home', '/{repo_name}/changeset/{revision}',
|
|
634
|
controller='changeset', revision='tip',
|
|
694
|
controller='changeset', revision='tip', jsroute=True,
|
|
635
|
conditions={'function': check_repo},
|
|
695
|
conditions={'function': check_repo},
|
|
636
|
requirements=URL_NAME_REQUIREMENTS)
|
|
696
|
requirements=URL_NAME_REQUIREMENTS)
|
|
637
|
rmap.connect('changeset_children', '/{repo_name}/changeset_children/{revision}',
|
|
697
|
rmap.connect('changeset_children', '/{repo_name}/changeset_children/{revision}',
|
|
638
|
controller='changeset', revision='tip', action='changeset_children',
|
|
698
|
controller='changeset', revision='tip', action='changeset_children',
|
|
639
|
conditions={'function': check_repo},
|
|
699
|
conditions={'function': check_repo},
|
|
640
|
requirements=URL_NAME_REQUIREMENTS)
|
|
700
|
requirements=URL_NAME_REQUIREMENTS)
|
|
641
|
rmap.connect('changeset_parents', '/{repo_name}/changeset_parents/{revision}',
|
|
701
|
rmap.connect('changeset_parents', '/{repo_name}/changeset_parents/{revision}',
|
|
642
|
controller='changeset', revision='tip', action='changeset_parents',
|
|
702
|
controller='changeset', revision='tip', action='changeset_parents',
|
|
643
|
conditions={'function': check_repo},
|
|
703
|
conditions={'function': check_repo},
|
|
644
|
requirements=URL_NAME_REQUIREMENTS)
|
|
704
|
requirements=URL_NAME_REQUIREMENTS)
|
|
645
|
|
|
705
|
|
|
646
|
# repo edit options
|
|
706
|
# repo edit options
|
|
647
|
rmap.connect('edit_repo', '/{repo_name}/settings',
|
|
707
|
rmap.connect('edit_repo', '/{repo_name}/settings', jsroute=True,
|
|
648
|
controller='admin/repos', action='edit',
|
|
708
|
controller='admin/repos', action='edit',
|
|
649
|
conditions={'method': ['GET'], 'function': check_repo},
|
|
709
|
conditions={'method': ['GET'], 'function': check_repo},
|
|
650
|
requirements=URL_NAME_REQUIREMENTS)
|
|
710
|
requirements=URL_NAME_REQUIREMENTS)
|
|
651
|
|
|
711
|
|
|
652
|
rmap.connect('edit_repo_perms', '/{repo_name}/settings/permissions',
|
|
712
|
rmap.connect('edit_repo_perms', '/{repo_name}/settings/permissions',
|
|
|
|
|
713
|
jsroute=True,
|
|
653
|
controller='admin/repos', action='edit_permissions',
|
|
714
|
controller='admin/repos', action='edit_permissions',
|
|
654
|
conditions={'method': ['GET'], 'function': check_repo},
|
|
715
|
conditions={'method': ['GET'], 'function': check_repo},
|
|
655
|
requirements=URL_NAME_REQUIREMENTS)
|
|
716
|
requirements=URL_NAME_REQUIREMENTS)
|
|
656
|
rmap.connect('edit_repo_perms_update', '/{repo_name}/settings/permissions',
|
|
717
|
rmap.connect('edit_repo_perms_update', '/{repo_name}/settings/permissions',
|
|
657
|
controller='admin/repos', action='edit_permissions_update',
|
|
718
|
controller='admin/repos', action='edit_permissions_update',
|
|
658
|
conditions={'method': ['PUT'], 'function': check_repo},
|
|
719
|
conditions={'method': ['PUT'], 'function': check_repo},
|
|
659
|
requirements=URL_NAME_REQUIREMENTS)
|
|
720
|
requirements=URL_NAME_REQUIREMENTS)
|
|
660
|
|
|
721
|
|
|
661
|
rmap.connect('edit_repo_fields', '/{repo_name}/settings/fields',
|
|
722
|
rmap.connect('edit_repo_fields', '/{repo_name}/settings/fields',
|
|
662
|
controller='admin/repos', action='edit_fields',
|
|
723
|
controller='admin/repos', action='edit_fields',
|
|
663
|
conditions={'method': ['GET'], 'function': check_repo},
|
|
724
|
conditions={'method': ['GET'], 'function': check_repo},
|
|
664
|
requirements=URL_NAME_REQUIREMENTS)
|
|
725
|
requirements=URL_NAME_REQUIREMENTS)
|
|
665
|
rmap.connect('create_repo_fields', '/{repo_name}/settings/fields/new',
|
|
726
|
rmap.connect('create_repo_fields', '/{repo_name}/settings/fields/new',
|
|
666
|
controller='admin/repos', action='create_repo_field',
|
|
727
|
controller='admin/repos', action='create_repo_field',
|
|
667
|
conditions={'method': ['PUT'], 'function': check_repo},
|
|
728
|
conditions={'method': ['PUT'], 'function': check_repo},
|
|
668
|
requirements=URL_NAME_REQUIREMENTS)
|
|
729
|
requirements=URL_NAME_REQUIREMENTS)
|
|
669
|
rmap.connect('delete_repo_fields', '/{repo_name}/settings/fields/{field_id}',
|
|
730
|
rmap.connect('delete_repo_fields', '/{repo_name}/settings/fields/{field_id}',
|
|
670
|
controller='admin/repos', action='delete_repo_field',
|
|
731
|
controller='admin/repos', action='delete_repo_field',
|
|
671
|
conditions={'method': ['DELETE'], 'function': check_repo},
|
|
732
|
conditions={'method': ['DELETE'], 'function': check_repo},
|
|
672
|
requirements=URL_NAME_REQUIREMENTS)
|
|
733
|
requirements=URL_NAME_REQUIREMENTS)
|
|
673
|
|
|
734
|
|
|
674
|
rmap.connect('edit_repo_advanced', '/{repo_name}/settings/advanced',
|
|
735
|
rmap.connect('edit_repo_advanced', '/{repo_name}/settings/advanced',
|
|
675
|
controller='admin/repos', action='edit_advanced',
|
|
736
|
controller='admin/repos', action='edit_advanced',
|
|
676
|
conditions={'method': ['GET'], 'function': check_repo},
|
|
737
|
conditions={'method': ['GET'], 'function': check_repo},
|
|
677
|
requirements=URL_NAME_REQUIREMENTS)
|
|
738
|
requirements=URL_NAME_REQUIREMENTS)
|
|
678
|
|
|
739
|
|
|
679
|
rmap.connect('edit_repo_advanced_locking', '/{repo_name}/settings/advanced/locking',
|
|
740
|
rmap.connect('edit_repo_advanced_locking', '/{repo_name}/settings/advanced/locking',
|
|
680
|
controller='admin/repos', action='edit_advanced_locking',
|
|
741
|
controller='admin/repos', action='edit_advanced_locking',
|
|
681
|
conditions={'method': ['PUT'], 'function': check_repo},
|
|
742
|
conditions={'method': ['PUT'], 'function': check_repo},
|
|
682
|
requirements=URL_NAME_REQUIREMENTS)
|
|
743
|
requirements=URL_NAME_REQUIREMENTS)
|
|
683
|
rmap.connect('toggle_locking', '/{repo_name}/settings/advanced/locking_toggle',
|
|
744
|
rmap.connect('toggle_locking', '/{repo_name}/settings/advanced/locking_toggle',
|
|
684
|
controller='admin/repos', action='toggle_locking',
|
|
745
|
controller='admin/repos', action='toggle_locking',
|
|
685
|
conditions={'method': ['GET'], 'function': check_repo},
|
|
746
|
conditions={'method': ['GET'], 'function': check_repo},
|
|
686
|
requirements=URL_NAME_REQUIREMENTS)
|
|
747
|
requirements=URL_NAME_REQUIREMENTS)
|
|
687
|
|
|
748
|
|
|
688
|
rmap.connect('edit_repo_advanced_journal', '/{repo_name}/settings/advanced/journal',
|
|
749
|
rmap.connect('edit_repo_advanced_journal', '/{repo_name}/settings/advanced/journal',
|
|
689
|
controller='admin/repos', action='edit_advanced_journal',
|
|
750
|
controller='admin/repos', action='edit_advanced_journal',
|
|
690
|
conditions={'method': ['PUT'], 'function': check_repo},
|
|
751
|
conditions={'method': ['PUT'], 'function': check_repo},
|
|
691
|
requirements=URL_NAME_REQUIREMENTS)
|
|
752
|
requirements=URL_NAME_REQUIREMENTS)
|
|
692
|
|
|
753
|
|
|
693
|
rmap.connect('edit_repo_advanced_fork', '/{repo_name}/settings/advanced/fork',
|
|
754
|
rmap.connect('edit_repo_advanced_fork', '/{repo_name}/settings/advanced/fork',
|
|
694
|
controller='admin/repos', action='edit_advanced_fork',
|
|
755
|
controller='admin/repos', action='edit_advanced_fork',
|
|
695
|
conditions={'method': ['PUT'], 'function': check_repo},
|
|
756
|
conditions={'method': ['PUT'], 'function': check_repo},
|
|
696
|
requirements=URL_NAME_REQUIREMENTS)
|
|
757
|
requirements=URL_NAME_REQUIREMENTS)
|
|
697
|
|
|
758
|
|
|
698
|
rmap.connect('edit_repo_caches', '/{repo_name}/settings/caches',
|
|
759
|
rmap.connect('edit_repo_caches', '/{repo_name}/settings/caches',
|
|
699
|
controller='admin/repos', action='edit_caches_form',
|
|
760
|
controller='admin/repos', action='edit_caches_form',
|
|
700
|
conditions={'method': ['GET'], 'function': check_repo},
|
|
761
|
conditions={'method': ['GET'], 'function': check_repo},
|
|
701
|
requirements=URL_NAME_REQUIREMENTS)
|
|
762
|
requirements=URL_NAME_REQUIREMENTS)
|
|
702
|
rmap.connect('edit_repo_caches', '/{repo_name}/settings/caches',
|
|
763
|
rmap.connect('edit_repo_caches', '/{repo_name}/settings/caches',
|
|
703
|
controller='admin/repos', action='edit_caches',
|
|
764
|
controller='admin/repos', action='edit_caches',
|
|
704
|
conditions={'method': ['PUT'], 'function': check_repo},
|
|
765
|
conditions={'method': ['PUT'], 'function': check_repo},
|
|
705
|
requirements=URL_NAME_REQUIREMENTS)
|
|
766
|
requirements=URL_NAME_REQUIREMENTS)
|
|
706
|
|
|
767
|
|
|
707
|
rmap.connect('edit_repo_remote', '/{repo_name}/settings/remote',
|
|
768
|
rmap.connect('edit_repo_remote', '/{repo_name}/settings/remote',
|
|
708
|
controller='admin/repos', action='edit_remote_form',
|
|
769
|
controller='admin/repos', action='edit_remote_form',
|
|
709
|
conditions={'method': ['GET'], 'function': check_repo},
|
|
770
|
conditions={'method': ['GET'], 'function': check_repo},
|
|
710
|
requirements=URL_NAME_REQUIREMENTS)
|
|
771
|
requirements=URL_NAME_REQUIREMENTS)
|
|
711
|
rmap.connect('edit_repo_remote', '/{repo_name}/settings/remote',
|
|
772
|
rmap.connect('edit_repo_remote', '/{repo_name}/settings/remote',
|
|
712
|
controller='admin/repos', action='edit_remote',
|
|
773
|
controller='admin/repos', action='edit_remote',
|
|
713
|
conditions={'method': ['PUT'], 'function': check_repo},
|
|
774
|
conditions={'method': ['PUT'], 'function': check_repo},
|
|
714
|
requirements=URL_NAME_REQUIREMENTS)
|
|
775
|
requirements=URL_NAME_REQUIREMENTS)
|
|
715
|
|
|
776
|
|
|
716
|
rmap.connect('edit_repo_statistics', '/{repo_name}/settings/statistics',
|
|
777
|
rmap.connect('edit_repo_statistics', '/{repo_name}/settings/statistics',
|
|
717
|
controller='admin/repos', action='edit_statistics_form',
|
|
778
|
controller='admin/repos', action='edit_statistics_form',
|
|
718
|
conditions={'method': ['GET'], 'function': check_repo},
|
|
779
|
conditions={'method': ['GET'], 'function': check_repo},
|
|
719
|
requirements=URL_NAME_REQUIREMENTS)
|
|
780
|
requirements=URL_NAME_REQUIREMENTS)
|
|
720
|
rmap.connect('edit_repo_statistics', '/{repo_name}/settings/statistics',
|
|
781
|
rmap.connect('edit_repo_statistics', '/{repo_name}/settings/statistics',
|
|
721
|
controller='admin/repos', action='edit_statistics',
|
|
782
|
controller='admin/repos', action='edit_statistics',
|
|
722
|
conditions={'method': ['PUT'], 'function': check_repo},
|
|
783
|
conditions={'method': ['PUT'], 'function': check_repo},
|
|
723
|
requirements=URL_NAME_REQUIREMENTS)
|
|
784
|
requirements=URL_NAME_REQUIREMENTS)
|
|
724
|
rmap.connect('repo_settings_issuetracker',
|
|
785
|
rmap.connect('repo_settings_issuetracker',
|
|
725
|
'/{repo_name}/settings/issue-tracker',
|
|
786
|
'/{repo_name}/settings/issue-tracker',
|
|
726
|
controller='admin/repos', action='repo_issuetracker',
|
|
787
|
controller='admin/repos', action='repo_issuetracker',
|
|
727
|
conditions={'method': ['GET'], 'function': check_repo},
|
|
788
|
conditions={'method': ['GET'], 'function': check_repo},
|
|
728
|
requirements=URL_NAME_REQUIREMENTS)
|
|
789
|
requirements=URL_NAME_REQUIREMENTS)
|
|
729
|
rmap.connect('repo_issuetracker_test',
|
|
790
|
rmap.connect('repo_issuetracker_test',
|
|
730
|
'/{repo_name}/settings/issue-tracker/test',
|
|
791
|
'/{repo_name}/settings/issue-tracker/test',
|
|
731
|
controller='admin/repos', action='repo_issuetracker_test',
|
|
792
|
controller='admin/repos', action='repo_issuetracker_test',
|
|
732
|
conditions={'method': ['POST'], 'function': check_repo},
|
|
793
|
conditions={'method': ['POST'], 'function': check_repo},
|
|
733
|
requirements=URL_NAME_REQUIREMENTS)
|
|
794
|
requirements=URL_NAME_REQUIREMENTS)
|
|
734
|
rmap.connect('repo_issuetracker_delete',
|
|
795
|
rmap.connect('repo_issuetracker_delete',
|
|
735
|
'/{repo_name}/settings/issue-tracker/delete',
|
|
796
|
'/{repo_name}/settings/issue-tracker/delete',
|
|
736
|
controller='admin/repos', action='repo_issuetracker_delete',
|
|
797
|
controller='admin/repos', action='repo_issuetracker_delete',
|
|
737
|
conditions={'method': ['DELETE'], 'function': check_repo},
|
|
798
|
conditions={'method': ['DELETE'], 'function': check_repo},
|
|
738
|
requirements=URL_NAME_REQUIREMENTS)
|
|
799
|
requirements=URL_NAME_REQUIREMENTS)
|
|
739
|
rmap.connect('repo_issuetracker_save',
|
|
800
|
rmap.connect('repo_issuetracker_save',
|
|
740
|
'/{repo_name}/settings/issue-tracker/save',
|
|
801
|
'/{repo_name}/settings/issue-tracker/save',
|
|
741
|
controller='admin/repos', action='repo_issuetracker_save',
|
|
802
|
controller='admin/repos', action='repo_issuetracker_save',
|
|
742
|
conditions={'method': ['POST'], 'function': check_repo},
|
|
803
|
conditions={'method': ['POST'], 'function': check_repo},
|
|
743
|
requirements=URL_NAME_REQUIREMENTS)
|
|
804
|
requirements=URL_NAME_REQUIREMENTS)
|
|
744
|
rmap.connect('repo_vcs_settings', '/{repo_name}/settings/vcs',
|
|
805
|
rmap.connect('repo_vcs_settings', '/{repo_name}/settings/vcs',
|
|
745
|
controller='admin/repos', action='repo_settings_vcs_update',
|
|
806
|
controller='admin/repos', action='repo_settings_vcs_update',
|
|
746
|
conditions={'method': ['POST'], 'function': check_repo},
|
|
807
|
conditions={'method': ['POST'], 'function': check_repo},
|
|
747
|
requirements=URL_NAME_REQUIREMENTS)
|
|
808
|
requirements=URL_NAME_REQUIREMENTS)
|
|
748
|
rmap.connect('repo_vcs_settings', '/{repo_name}/settings/vcs',
|
|
809
|
rmap.connect('repo_vcs_settings', '/{repo_name}/settings/vcs',
|
|
749
|
controller='admin/repos', action='repo_settings_vcs',
|
|
810
|
controller='admin/repos', action='repo_settings_vcs',
|
|
750
|
conditions={'method': ['GET'], 'function': check_repo},
|
|
811
|
conditions={'method': ['GET'], 'function': check_repo},
|
|
751
|
requirements=URL_NAME_REQUIREMENTS)
|
|
812
|
requirements=URL_NAME_REQUIREMENTS)
|
|
752
|
rmap.connect('repo_vcs_settings', '/{repo_name}/settings/vcs',
|
|
813
|
rmap.connect('repo_vcs_settings', '/{repo_name}/settings/vcs',
|
|
753
|
controller='admin/repos', action='repo_delete_svn_pattern',
|
|
814
|
controller='admin/repos', action='repo_delete_svn_pattern',
|
|
754
|
conditions={'method': ['DELETE'], 'function': check_repo},
|
|
815
|
conditions={'method': ['DELETE'], 'function': check_repo},
|
|
755
|
requirements=URL_NAME_REQUIREMENTS)
|
|
816
|
requirements=URL_NAME_REQUIREMENTS)
|
|
756
|
|
|
817
|
|
|
757
|
# still working url for backward compat.
|
|
818
|
# still working url for backward compat.
|
|
758
|
rmap.connect('raw_changeset_home_depraced',
|
|
819
|
rmap.connect('raw_changeset_home_depraced',
|
|
759
|
'/{repo_name}/raw-changeset/{revision}',
|
|
820
|
'/{repo_name}/raw-changeset/{revision}',
|
|
760
|
controller='changeset', action='changeset_raw',
|
|
821
|
controller='changeset', action='changeset_raw',
|
|
761
|
revision='tip', conditions={'function': check_repo},
|
|
822
|
revision='tip', conditions={'function': check_repo},
|
|
762
|
requirements=URL_NAME_REQUIREMENTS)
|
|
823
|
requirements=URL_NAME_REQUIREMENTS)
|
|
763
|
|
|
824
|
|
|
764
|
# new URLs
|
|
825
|
# new URLs
|
|
765
|
rmap.connect('changeset_raw_home',
|
|
826
|
rmap.connect('changeset_raw_home',
|
|
766
|
'/{repo_name}/changeset-diff/{revision}',
|
|
827
|
'/{repo_name}/changeset-diff/{revision}',
|
|
767
|
controller='changeset', action='changeset_raw',
|
|
828
|
controller='changeset', action='changeset_raw',
|
|
768
|
revision='tip', conditions={'function': check_repo},
|
|
829
|
revision='tip', conditions={'function': check_repo},
|
|
769
|
requirements=URL_NAME_REQUIREMENTS)
|
|
830
|
requirements=URL_NAME_REQUIREMENTS)
|
|
770
|
|
|
831
|
|
|
771
|
rmap.connect('changeset_patch_home',
|
|
832
|
rmap.connect('changeset_patch_home',
|
|
772
|
'/{repo_name}/changeset-patch/{revision}',
|
|
833
|
'/{repo_name}/changeset-patch/{revision}',
|
|
773
|
controller='changeset', action='changeset_patch',
|
|
834
|
controller='changeset', action='changeset_patch',
|
|
774
|
revision='tip', conditions={'function': check_repo},
|
|
835
|
revision='tip', conditions={'function': check_repo},
|
|
775
|
requirements=URL_NAME_REQUIREMENTS)
|
|
836
|
requirements=URL_NAME_REQUIREMENTS)
|
|
776
|
|
|
837
|
|
|
777
|
rmap.connect('changeset_download_home',
|
|
838
|
rmap.connect('changeset_download_home',
|
|
778
|
'/{repo_name}/changeset-download/{revision}',
|
|
839
|
'/{repo_name}/changeset-download/{revision}',
|
|
779
|
controller='changeset', action='changeset_download',
|
|
840
|
controller='changeset', action='changeset_download',
|
|
780
|
revision='tip', conditions={'function': check_repo},
|
|
841
|
revision='tip', conditions={'function': check_repo},
|
|
781
|
requirements=URL_NAME_REQUIREMENTS)
|
|
842
|
requirements=URL_NAME_REQUIREMENTS)
|
|
782
|
|
|
843
|
|
|
783
|
rmap.connect('changeset_comment',
|
|
844
|
rmap.connect('changeset_comment',
|
|
784
|
'/{repo_name}/changeset/{revision}/comment',
|
|
845
|
'/{repo_name}/changeset/{revision}/comment', jsroute=True,
|
|
785
|
controller='changeset', revision='tip', action='comment',
|
|
846
|
controller='changeset', revision='tip', action='comment',
|
|
786
|
conditions={'function': check_repo},
|
|
847
|
conditions={'function': check_repo},
|
|
787
|
requirements=URL_NAME_REQUIREMENTS)
|
|
848
|
requirements=URL_NAME_REQUIREMENTS)
|
|
788
|
|
|
849
|
|
|
789
|
rmap.connect('changeset_comment_preview',
|
|
850
|
rmap.connect('changeset_comment_preview',
|
|
790
|
'/{repo_name}/changeset/comment/preview',
|
|
851
|
'/{repo_name}/changeset/comment/preview', jsroute=True,
|
|
791
|
controller='changeset', action='preview_comment',
|
|
852
|
controller='changeset', action='preview_comment',
|
|
792
|
conditions={'function': check_repo, 'method': ['POST']},
|
|
853
|
conditions={'function': check_repo, 'method': ['POST']},
|
|
793
|
requirements=URL_NAME_REQUIREMENTS)
|
|
854
|
requirements=URL_NAME_REQUIREMENTS)
|
|
794
|
|
|
855
|
|
|
795
|
rmap.connect('changeset_comment_delete',
|
|
856
|
rmap.connect('changeset_comment_delete',
|
|
796
|
'/{repo_name}/changeset/comment/{comment_id}/delete',
|
|
857
|
'/{repo_name}/changeset/comment/{comment_id}/delete',
|
|
797
|
controller='changeset', action='delete_comment',
|
|
858
|
controller='changeset', action='delete_comment',
|
|
798
|
conditions={'function': check_repo, 'method': ['DELETE']},
|
|
859
|
conditions={'function': check_repo, 'method': ['DELETE']},
|
|
799
|
requirements=URL_NAME_REQUIREMENTS)
|
|
860
|
requirements=URL_NAME_REQUIREMENTS, jsroute=True)
|
|
800
|
|
|
861
|
|
|
801
|
rmap.connect('changeset_info', '/changeset_info/{repo_name}/{revision}',
|
|
862
|
rmap.connect('changeset_info', '/changeset_info/{repo_name}/{revision}',
|
|
802
|
controller='changeset', action='changeset_info',
|
|
863
|
controller='changeset', action='changeset_info',
|
|
803
|
requirements=URL_NAME_REQUIREMENTS)
|
|
864
|
requirements=URL_NAME_REQUIREMENTS, jsroute=True)
|
|
804
|
|
|
865
|
|
|
805
|
rmap.connect('compare_home',
|
|
866
|
rmap.connect('compare_home',
|
|
806
|
'/{repo_name}/compare',
|
|
867
|
'/{repo_name}/compare',
|
|
807
|
controller='compare', action='index',
|
|
868
|
controller='compare', action='index',
|
|
808
|
conditions={'function': check_repo},
|
|
869
|
conditions={'function': check_repo},
|
|
809
|
requirements=URL_NAME_REQUIREMENTS)
|
|
870
|
requirements=URL_NAME_REQUIREMENTS)
|
|
810
|
|
|
871
|
|
|
811
|
rmap.connect('compare_url',
|
|
872
|
rmap.connect('compare_url',
|
|
812
|
'/{repo_name}/compare/{source_ref_type}@{source_ref:.*?}...{target_ref_type}@{target_ref:.*?}',
|
|
873
|
'/{repo_name}/compare/{source_ref_type}@{source_ref:.*?}...{target_ref_type}@{target_ref:.*?}',
|
|
813
|
controller='compare', action='compare',
|
|
874
|
controller='compare', action='compare',
|
|
814
|
conditions={'function': check_repo},
|
|
875
|
conditions={'function': check_repo},
|
|
815
|
requirements=URL_NAME_REQUIREMENTS)
|
|
876
|
requirements=URL_NAME_REQUIREMENTS, jsroute=True)
|
|
816
|
|
|
877
|
|
|
817
|
rmap.connect('pullrequest_home',
|
|
878
|
rmap.connect('pullrequest_home',
|
|
818
|
'/{repo_name}/pull-request/new', controller='pullrequests',
|
|
879
|
'/{repo_name}/pull-request/new', controller='pullrequests',
|
|
819
|
action='index', conditions={'function': check_repo,
|
|
880
|
action='index', conditions={'function': check_repo,
|
|
820
|
'method': ['GET']},
|
|
881
|
'method': ['GET']},
|
|
821
|
requirements=URL_NAME_REQUIREMENTS)
|
|
882
|
requirements=URL_NAME_REQUIREMENTS, jsroute=True)
|
|
822
|
|
|
883
|
|
|
823
|
rmap.connect('pullrequest',
|
|
884
|
rmap.connect('pullrequest',
|
|
824
|
'/{repo_name}/pull-request/new', controller='pullrequests',
|
|
885
|
'/{repo_name}/pull-request/new', controller='pullrequests',
|
|
825
|
action='create', conditions={'function': check_repo,
|
|
886
|
action='create', conditions={'function': check_repo,
|
|
826
|
'method': ['POST']},
|
|
887
|
'method': ['POST']},
|
|
827
|
requirements=URL_NAME_REQUIREMENTS)
|
|
888
|
requirements=URL_NAME_REQUIREMENTS, jsroute=True)
|
|
828
|
|
|
889
|
|
|
829
|
rmap.connect('pullrequest_repo_refs',
|
|
890
|
rmap.connect('pullrequest_repo_refs',
|
|
830
|
'/{repo_name}/pull-request/refs/{target_repo_name:.*?[^/]}',
|
|
891
|
'/{repo_name}/pull-request/refs/{target_repo_name:.*?[^/]}',
|
|
831
|
controller='pullrequests',
|
|
892
|
controller='pullrequests',
|
|
832
|
action='get_repo_refs',
|
|
893
|
action='get_repo_refs',
|
|
833
|
conditions={'function': check_repo, 'method': ['GET']},
|
|
894
|
conditions={'function': check_repo, 'method': ['GET']},
|
|
834
|
requirements=URL_NAME_REQUIREMENTS)
|
|
895
|
requirements=URL_NAME_REQUIREMENTS, jsroute=True)
|
|
835
|
|
|
896
|
|
|
836
|
rmap.connect('pullrequest_repo_destinations',
|
|
897
|
rmap.connect('pullrequest_repo_destinations',
|
|
837
|
'/{repo_name}/pull-request/repo-destinations',
|
|
898
|
'/{repo_name}/pull-request/repo-destinations',
|
|
838
|
controller='pullrequests',
|
|
899
|
controller='pullrequests',
|
|
839
|
action='get_repo_destinations',
|
|
900
|
action='get_repo_destinations',
|
|
840
|
conditions={'function': check_repo, 'method': ['GET']},
|
|
901
|
conditions={'function': check_repo, 'method': ['GET']},
|
|
841
|
requirements=URL_NAME_REQUIREMENTS)
|
|
902
|
requirements=URL_NAME_REQUIREMENTS, jsroute=True)
|
|
842
|
|
|
903
|
|
|
843
|
rmap.connect('pullrequest_show',
|
|
904
|
rmap.connect('pullrequest_show',
|
|
844
|
'/{repo_name}/pull-request/{pull_request_id}',
|
|
905
|
'/{repo_name}/pull-request/{pull_request_id}',
|
|
845
|
controller='pullrequests',
|
|
906
|
controller='pullrequests',
|
|
846
|
action='show', conditions={'function': check_repo,
|
|
907
|
action='show', conditions={'function': check_repo,
|
|
847
|
'method': ['GET']},
|
|
908
|
'method': ['GET']},
|
|
848
|
requirements=URL_NAME_REQUIREMENTS)
|
|
909
|
requirements=URL_NAME_REQUIREMENTS)
|
|
849
|
|
|
910
|
|
|
850
|
rmap.connect('pullrequest_update',
|
|
911
|
rmap.connect('pullrequest_update',
|
|
851
|
'/{repo_name}/pull-request/{pull_request_id}',
|
|
912
|
'/{repo_name}/pull-request/{pull_request_id}',
|
|
852
|
controller='pullrequests',
|
|
913
|
controller='pullrequests',
|
|
853
|
action='update', conditions={'function': check_repo,
|
|
914
|
action='update', conditions={'function': check_repo,
|
|
854
|
'method': ['PUT']},
|
|
915
|
'method': ['PUT']},
|
|
855
|
requirements=URL_NAME_REQUIREMENTS)
|
|
916
|
requirements=URL_NAME_REQUIREMENTS, jsroute=True)
|
|
856
|
|
|
917
|
|
|
857
|
rmap.connect('pullrequest_merge',
|
|
918
|
rmap.connect('pullrequest_merge',
|
|
858
|
'/{repo_name}/pull-request/{pull_request_id}',
|
|
919
|
'/{repo_name}/pull-request/{pull_request_id}',
|
|
859
|
controller='pullrequests',
|
|
920
|
controller='pullrequests',
|
|
860
|
action='merge', conditions={'function': check_repo,
|
|
921
|
action='merge', conditions={'function': check_repo,
|
|
861
|
'method': ['POST']},
|
|
922
|
'method': ['POST']},
|
|
862
|
requirements=URL_NAME_REQUIREMENTS)
|
|
923
|
requirements=URL_NAME_REQUIREMENTS)
|
|
863
|
|
|
924
|
|
|
864
|
rmap.connect('pullrequest_delete',
|
|
925
|
rmap.connect('pullrequest_delete',
|
|
865
|
'/{repo_name}/pull-request/{pull_request_id}',
|
|
926
|
'/{repo_name}/pull-request/{pull_request_id}',
|
|
866
|
controller='pullrequests',
|
|
927
|
controller='pullrequests',
|
|
867
|
action='delete', conditions={'function': check_repo,
|
|
928
|
action='delete', conditions={'function': check_repo,
|
|
868
|
'method': ['DELETE']},
|
|
929
|
'method': ['DELETE']},
|
|
869
|
requirements=URL_NAME_REQUIREMENTS)
|
|
930
|
requirements=URL_NAME_REQUIREMENTS)
|
|
870
|
|
|
931
|
|
|
871
|
rmap.connect('pullrequest_show_all',
|
|
932
|
rmap.connect('pullrequest_show_all',
|
|
872
|
'/{repo_name}/pull-request',
|
|
933
|
'/{repo_name}/pull-request',
|
|
873
|
controller='pullrequests',
|
|
934
|
controller='pullrequests',
|
|
874
|
action='show_all', conditions={'function': check_repo,
|
|
935
|
action='show_all', conditions={'function': check_repo,
|
|
875
|
'method': ['GET']},
|
|
936
|
'method': ['GET']},
|
|
876
|
requirements=URL_NAME_REQUIREMENTS)
|
|
937
|
requirements=URL_NAME_REQUIREMENTS, jsroute=True)
|
|
877
|
|
|
938
|
|
|
878
|
rmap.connect('pullrequest_comment',
|
|
939
|
rmap.connect('pullrequest_comment',
|
|
879
|
'/{repo_name}/pull-request-comment/{pull_request_id}',
|
|
940
|
'/{repo_name}/pull-request-comment/{pull_request_id}',
|
|
880
|
controller='pullrequests',
|
|
941
|
controller='pullrequests',
|
|
881
|
action='comment', conditions={'function': check_repo,
|
|
942
|
action='comment', conditions={'function': check_repo,
|
|
882
|
'method': ['POST']},
|
|
943
|
'method': ['POST']},
|
|
883
|
requirements=URL_NAME_REQUIREMENTS)
|
|
944
|
requirements=URL_NAME_REQUIREMENTS, jsroute=True)
|
|
884
|
|
|
945
|
|
|
885
|
rmap.connect('pullrequest_comment_delete',
|
|
946
|
rmap.connect('pullrequest_comment_delete',
|
|
886
|
'/{repo_name}/pull-request-comment/{comment_id}/delete',
|
|
947
|
'/{repo_name}/pull-request-comment/{comment_id}/delete',
|
|
887
|
controller='pullrequests', action='delete_comment',
|
|
948
|
controller='pullrequests', action='delete_comment',
|
|
888
|
conditions={'function': check_repo, 'method': ['DELETE']},
|
|
949
|
conditions={'function': check_repo, 'method': ['DELETE']},
|
|
889
|
requirements=URL_NAME_REQUIREMENTS)
|
|
950
|
requirements=URL_NAME_REQUIREMENTS, jsroute=True)
|
|
890
|
|
|
951
|
|
|
891
|
rmap.connect('summary_home_explicit', '/{repo_name}/summary',
|
|
952
|
rmap.connect('summary_home_explicit', '/{repo_name}/summary',
|
|
892
|
controller='summary', conditions={'function': check_repo},
|
|
953
|
controller='summary', conditions={'function': check_repo},
|
|
893
|
requirements=URL_NAME_REQUIREMENTS)
|
|
954
|
requirements=URL_NAME_REQUIREMENTS)
|
|
894
|
|
|
955
|
|
|
895
|
rmap.connect('branches_home', '/{repo_name}/branches',
|
|
956
|
rmap.connect('branches_home', '/{repo_name}/branches',
|
|
896
|
controller='branches', conditions={'function': check_repo},
|
|
957
|
controller='branches', conditions={'function': check_repo},
|
|
897
|
requirements=URL_NAME_REQUIREMENTS)
|
|
958
|
requirements=URL_NAME_REQUIREMENTS)
|
|
898
|
|
|
959
|
|
|
899
|
rmap.connect('tags_home', '/{repo_name}/tags',
|
|
960
|
rmap.connect('tags_home', '/{repo_name}/tags',
|
|
900
|
controller='tags', conditions={'function': check_repo},
|
|
961
|
controller='tags', conditions={'function': check_repo},
|
|
901
|
requirements=URL_NAME_REQUIREMENTS)
|
|
962
|
requirements=URL_NAME_REQUIREMENTS)
|
|
902
|
|
|
963
|
|
|
903
|
rmap.connect('bookmarks_home', '/{repo_name}/bookmarks',
|
|
964
|
rmap.connect('bookmarks_home', '/{repo_name}/bookmarks',
|
|
904
|
controller='bookmarks', conditions={'function': check_repo},
|
|
965
|
controller='bookmarks', conditions={'function': check_repo},
|
|
905
|
requirements=URL_NAME_REQUIREMENTS)
|
|
966
|
requirements=URL_NAME_REQUIREMENTS)
|
|
906
|
|
|
967
|
|
|
907
|
rmap.connect('changelog_home', '/{repo_name}/changelog',
|
|
968
|
rmap.connect('changelog_home', '/{repo_name}/changelog', jsroute=True,
|
|
908
|
controller='changelog', conditions={'function': check_repo},
|
|
969
|
controller='changelog', conditions={'function': check_repo},
|
|
909
|
requirements=URL_NAME_REQUIREMENTS)
|
|
970
|
requirements=URL_NAME_REQUIREMENTS)
|
|
910
|
|
|
971
|
|
|
911
|
rmap.connect('changelog_summary_home', '/{repo_name}/changelog_summary',
|
|
972
|
rmap.connect('changelog_summary_home', '/{repo_name}/changelog_summary',
|
|
912
|
controller='changelog', action='changelog_summary',
|
|
973
|
controller='changelog', action='changelog_summary',
|
|
913
|
conditions={'function': check_repo},
|
|
974
|
conditions={'function': check_repo},
|
|
914
|
requirements=URL_NAME_REQUIREMENTS)
|
|
975
|
requirements=URL_NAME_REQUIREMENTS)
|
|
915
|
|
|
976
|
|
|
916
|
rmap.connect('changelog_file_home', '/{repo_name}/changelog/{revision}/{f_path}',
|
|
977
|
rmap.connect('changelog_file_home',
|
|
|
|
|
978
|
'/{repo_name}/changelog/{revision}/{f_path}',
|
|
917
|
controller='changelog', f_path=None,
|
|
979
|
controller='changelog', f_path=None,
|
|
918
|
conditions={'function': check_repo},
|
|
980
|
conditions={'function': check_repo},
|
|
919
|
requirements=URL_NAME_REQUIREMENTS)
|
|
981
|
requirements=URL_NAME_REQUIREMENTS, jsroute=True)
|
|
920
|
|
|
982
|
|
|
921
|
rmap.connect('changelog_details', '/{repo_name}/changelog_details/{cs}',
|
|
983
|
rmap.connect('changelog_details', '/{repo_name}/changelog_details/{cs}',
|
|
922
|
controller='changelog', action='changelog_details',
|
|
984
|
controller='changelog', action='changelog_details',
|
|
923
|
conditions={'function': check_repo},
|
|
985
|
conditions={'function': check_repo},
|
|
924
|
requirements=URL_NAME_REQUIREMENTS)
|
|
986
|
requirements=URL_NAME_REQUIREMENTS)
|
|
925
|
|
|
987
|
|
|
926
|
rmap.connect('files_home',
|
|
988
|
rmap.connect('files_home', '/{repo_name}/files/{revision}/{f_path}',
|
|
927
|
'/{repo_name}/files/{revision}/{f_path}',
|
|
|
|
|
928
|
controller='files', revision='tip', f_path='',
|
|
989
|
controller='files', revision='tip', f_path='',
|
|
929
|
conditions={'function': check_repo},
|
|
990
|
conditions={'function': check_repo},
|
|
930
|
requirements=URL_NAME_REQUIREMENTS)
|
|
991
|
requirements=URL_NAME_REQUIREMENTS, jsroute=True)
|
|
931
|
|
|
992
|
|
|
932
|
rmap.connect('files_home_simple_catchrev',
|
|
993
|
rmap.connect('files_home_simple_catchrev',
|
|
933
|
'/{repo_name}/files/{revision}',
|
|
994
|
'/{repo_name}/files/{revision}',
|
|
934
|
controller='files', revision='tip', f_path='',
|
|
995
|
controller='files', revision='tip', f_path='',
|
|
935
|
conditions={'function': check_repo},
|
|
996
|
conditions={'function': check_repo},
|
|
936
|
requirements=URL_NAME_REQUIREMENTS)
|
|
997
|
requirements=URL_NAME_REQUIREMENTS)
|
|
937
|
|
|
998
|
|
|
938
|
rmap.connect('files_home_simple_catchall',
|
|
999
|
rmap.connect('files_home_simple_catchall',
|
|
939
|
'/{repo_name}/files',
|
|
1000
|
'/{repo_name}/files',
|
|
940
|
controller='files', revision='tip', f_path='',
|
|
1001
|
controller='files', revision='tip', f_path='',
|
|
941
|
conditions={'function': check_repo},
|
|
1002
|
conditions={'function': check_repo},
|
|
942
|
requirements=URL_NAME_REQUIREMENTS)
|
|
1003
|
requirements=URL_NAME_REQUIREMENTS)
|
|
943
|
|
|
1004
|
|
|
944
|
rmap.connect('files_history_home',
|
|
1005
|
rmap.connect('files_history_home',
|
|
945
|
'/{repo_name}/history/{revision}/{f_path}',
|
|
1006
|
'/{repo_name}/history/{revision}/{f_path}',
|
|
946
|
controller='files', action='history', revision='tip', f_path='',
|
|
1007
|
controller='files', action='history', revision='tip', f_path='',
|
|
947
|
conditions={'function': check_repo},
|
|
1008
|
conditions={'function': check_repo},
|
|
948
|
requirements=URL_NAME_REQUIREMENTS)
|
|
1009
|
requirements=URL_NAME_REQUIREMENTS, jsroute=True)
|
|
949
|
|
|
1010
|
|
|
950
|
rmap.connect('files_authors_home',
|
|
1011
|
rmap.connect('files_authors_home',
|
|
951
|
'/{repo_name}/authors/{revision}/{f_path}',
|
|
1012
|
'/{repo_name}/authors/{revision}/{f_path}',
|
|
952
|
controller='files', action='authors', revision='tip', f_path='',
|
|
1013
|
controller='files', action='authors', revision='tip', f_path='',
|
|
953
|
conditions={'function': check_repo},
|
|
1014
|
conditions={'function': check_repo},
|
|
954
|
requirements=URL_NAME_REQUIREMENTS)
|
|
1015
|
requirements=URL_NAME_REQUIREMENTS, jsroute=True)
|
|
955
|
|
|
1016
|
|
|
956
|
rmap.connect('files_diff_home', '/{repo_name}/diff/{f_path}',
|
|
1017
|
rmap.connect('files_diff_home', '/{repo_name}/diff/{f_path}',
|
|
957
|
controller='files', action='diff', f_path='',
|
|
1018
|
controller='files', action='diff', f_path='',
|
|
958
|
conditions={'function': check_repo},
|
|
1019
|
conditions={'function': check_repo},
|
|
959
|
requirements=URL_NAME_REQUIREMENTS)
|
|
1020
|
requirements=URL_NAME_REQUIREMENTS)
|
|
960
|
|
|
1021
|
|
|
961
|
rmap.connect('files_diff_2way_home',
|
|
1022
|
rmap.connect('files_diff_2way_home',
|
|
962
|
'/{repo_name}/diff-2way/{f_path}',
|
|
1023
|
'/{repo_name}/diff-2way/{f_path}',
|
|
963
|
controller='files', action='diff_2way', f_path='',
|
|
1024
|
controller='files', action='diff_2way', f_path='',
|
|
964
|
conditions={'function': check_repo},
|
|
1025
|
conditions={'function': check_repo},
|
|
965
|
requirements=URL_NAME_REQUIREMENTS)
|
|
1026
|
requirements=URL_NAME_REQUIREMENTS)
|
|
966
|
|
|
1027
|
|
|
967
|
rmap.connect('files_rawfile_home',
|
|
1028
|
rmap.connect('files_rawfile_home',
|
|
968
|
'/{repo_name}/rawfile/{revision}/{f_path}',
|
|
1029
|
'/{repo_name}/rawfile/{revision}/{f_path}',
|
|
969
|
controller='files', action='rawfile', revision='tip',
|
|
1030
|
controller='files', action='rawfile', revision='tip',
|
|
970
|
f_path='', conditions={'function': check_repo},
|
|
1031
|
f_path='', conditions={'function': check_repo},
|
|
971
|
requirements=URL_NAME_REQUIREMENTS)
|
|
1032
|
requirements=URL_NAME_REQUIREMENTS)
|
|
972
|
|
|
1033
|
|
|
973
|
rmap.connect('files_raw_home',
|
|
1034
|
rmap.connect('files_raw_home',
|
|
974
|
'/{repo_name}/raw/{revision}/{f_path}',
|
|
1035
|
'/{repo_name}/raw/{revision}/{f_path}',
|
|
975
|
controller='files', action='raw', revision='tip', f_path='',
|
|
1036
|
controller='files', action='raw', revision='tip', f_path='',
|
|
976
|
conditions={'function': check_repo},
|
|
1037
|
conditions={'function': check_repo},
|
|
977
|
requirements=URL_NAME_REQUIREMENTS)
|
|
1038
|
requirements=URL_NAME_REQUIREMENTS)
|
|
978
|
|
|
1039
|
|
|
979
|
rmap.connect('files_render_home',
|
|
1040
|
rmap.connect('files_render_home',
|
|
980
|
'/{repo_name}/render/{revision}/{f_path}',
|
|
1041
|
'/{repo_name}/render/{revision}/{f_path}',
|
|
981
|
controller='files', action='index', revision='tip', f_path='',
|
|
1042
|
controller='files', action='index', revision='tip', f_path='',
|
|
982
|
rendered=True, conditions={'function': check_repo},
|
|
1043
|
rendered=True, conditions={'function': check_repo},
|
|
983
|
requirements=URL_NAME_REQUIREMENTS)
|
|
1044
|
requirements=URL_NAME_REQUIREMENTS)
|
|
984
|
|
|
1045
|
|
|
985
|
rmap.connect('files_annotate_home',
|
|
1046
|
rmap.connect('files_annotate_home',
|
|
986
|
'/{repo_name}/annotate/{revision}/{f_path}',
|
|
1047
|
'/{repo_name}/annotate/{revision}/{f_path}',
|
|
987
|
controller='files', action='index', revision='tip',
|
|
1048
|
controller='files', action='index', revision='tip',
|
|
988
|
f_path='', annotate=True, conditions={'function': check_repo},
|
|
1049
|
f_path='', annotate=True, conditions={'function': check_repo},
|
|
989
|
requirements=URL_NAME_REQUIREMENTS)
|
|
1050
|
requirements=URL_NAME_REQUIREMENTS)
|
|
990
|
|
|
1051
|
|
|
991
|
rmap.connect('files_edit',
|
|
1052
|
rmap.connect('files_edit',
|
|
992
|
'/{repo_name}/edit/{revision}/{f_path}',
|
|
1053
|
'/{repo_name}/edit/{revision}/{f_path}',
|
|
993
|
controller='files', action='edit', revision='tip',
|
|
1054
|
controller='files', action='edit', revision='tip',
|
|
994
|
f_path='',
|
|
1055
|
f_path='',
|
|
995
|
conditions={'function': check_repo, 'method': ['POST']},
|
|
1056
|
conditions={'function': check_repo, 'method': ['POST']},
|
|
996
|
requirements=URL_NAME_REQUIREMENTS)
|
|
1057
|
requirements=URL_NAME_REQUIREMENTS)
|
|
997
|
|
|
1058
|
|
|
998
|
rmap.connect('files_edit_home',
|
|
1059
|
rmap.connect('files_edit_home',
|
|
999
|
'/{repo_name}/edit/{revision}/{f_path}',
|
|
1060
|
'/{repo_name}/edit/{revision}/{f_path}',
|
|
1000
|
controller='files', action='edit_home', revision='tip',
|
|
1061
|
controller='files', action='edit_home', revision='tip',
|
|
1001
|
f_path='', conditions={'function': check_repo},
|
|
1062
|
f_path='', conditions={'function': check_repo},
|
|
1002
|
requirements=URL_NAME_REQUIREMENTS)
|
|
1063
|
requirements=URL_NAME_REQUIREMENTS)
|
|
1003
|
|
|
1064
|
|
|
1004
|
rmap.connect('files_add',
|
|
1065
|
rmap.connect('files_add',
|
|
1005
|
'/{repo_name}/add/{revision}/{f_path}',
|
|
1066
|
'/{repo_name}/add/{revision}/{f_path}',
|
|
1006
|
controller='files', action='add', revision='tip',
|
|
1067
|
controller='files', action='add', revision='tip',
|
|
1007
|
f_path='',
|
|
1068
|
f_path='',
|
|
1008
|
conditions={'function': check_repo, 'method': ['POST']},
|
|
1069
|
conditions={'function': check_repo, 'method': ['POST']},
|
|
1009
|
requirements=URL_NAME_REQUIREMENTS)
|
|
1070
|
requirements=URL_NAME_REQUIREMENTS)
|
|
1010
|
|
|
1071
|
|
|
1011
|
rmap.connect('files_add_home',
|
|
1072
|
rmap.connect('files_add_home',
|
|
1012
|
'/{repo_name}/add/{revision}/{f_path}',
|
|
1073
|
'/{repo_name}/add/{revision}/{f_path}',
|
|
1013
|
controller='files', action='add_home', revision='tip',
|
|
1074
|
controller='files', action='add_home', revision='tip',
|
|
1014
|
f_path='', conditions={'function': check_repo},
|
|
1075
|
f_path='', conditions={'function': check_repo},
|
|
1015
|
requirements=URL_NAME_REQUIREMENTS)
|
|
1076
|
requirements=URL_NAME_REQUIREMENTS)
|
|
1016
|
|
|
1077
|
|
|
1017
|
rmap.connect('files_delete',
|
|
1078
|
rmap.connect('files_delete',
|
|
1018
|
'/{repo_name}/delete/{revision}/{f_path}',
|
|
1079
|
'/{repo_name}/delete/{revision}/{f_path}',
|
|
1019
|
controller='files', action='delete', revision='tip',
|
|
1080
|
controller='files', action='delete', revision='tip',
|
|
1020
|
f_path='',
|
|
1081
|
f_path='',
|
|
1021
|
conditions={'function': check_repo, 'method': ['POST']},
|
|
1082
|
conditions={'function': check_repo, 'method': ['POST']},
|
|
1022
|
requirements=URL_NAME_REQUIREMENTS)
|
|
1083
|
requirements=URL_NAME_REQUIREMENTS)
|
|
1023
|
|
|
1084
|
|
|
1024
|
rmap.connect('files_delete_home',
|
|
1085
|
rmap.connect('files_delete_home',
|
|
1025
|
'/{repo_name}/delete/{revision}/{f_path}',
|
|
1086
|
'/{repo_name}/delete/{revision}/{f_path}',
|
|
1026
|
controller='files', action='delete_home', revision='tip',
|
|
1087
|
controller='files', action='delete_home', revision='tip',
|
|
1027
|
f_path='', conditions={'function': check_repo},
|
|
1088
|
f_path='', conditions={'function': check_repo},
|
|
1028
|
requirements=URL_NAME_REQUIREMENTS)
|
|
1089
|
requirements=URL_NAME_REQUIREMENTS)
|
|
1029
|
|
|
1090
|
|
|
1030
|
rmap.connect('files_archive_home', '/{repo_name}/archive/{fname}',
|
|
1091
|
rmap.connect('files_archive_home', '/{repo_name}/archive/{fname}',
|
|
1031
|
controller='files', action='archivefile',
|
|
1092
|
controller='files', action='archivefile',
|
|
1032
|
conditions={'function': check_repo},
|
|
1093
|
conditions={'function': check_repo},
|
|
1033
|
requirements=URL_NAME_REQUIREMENTS)
|
|
1094
|
requirements=URL_NAME_REQUIREMENTS, jsroute=True)
|
|
1034
|
|
|
1095
|
|
|
1035
|
rmap.connect('files_nodelist_home',
|
|
1096
|
rmap.connect('files_nodelist_home',
|
|
1036
|
'/{repo_name}/nodelist/{revision}/{f_path}',
|
|
1097
|
'/{repo_name}/nodelist/{revision}/{f_path}',
|
|
1037
|
controller='files', action='nodelist',
|
|
1098
|
controller='files', action='nodelist',
|
|
1038
|
conditions={'function': check_repo},
|
|
1099
|
conditions={'function': check_repo},
|
|
1039
|
requirements=URL_NAME_REQUIREMENTS)
|
|
1100
|
requirements=URL_NAME_REQUIREMENTS, jsroute=True)
|
|
1040
|
|
|
1101
|
|
|
1041
|
rmap.connect('files_metadata_list_home',
|
|
1102
|
rmap.connect('files_metadata_list_home',
|
|
1042
|
'/{repo_name}/metadata_list/{revision}/{f_path}',
|
|
1103
|
'/{repo_name}/metadata_list/{revision}/{f_path}',
|
|
1043
|
controller='files', action='metadata_list',
|
|
1104
|
controller='files', action='metadata_list',
|
|
1044
|
conditions={'function': check_repo},
|
|
1105
|
conditions={'function': check_repo},
|
|
1045
|
requirements=URL_NAME_REQUIREMENTS)
|
|
1106
|
requirements=URL_NAME_REQUIREMENTS, jsroute=True)
|
|
1046
|
|
|
1107
|
|
|
1047
|
rmap.connect('repo_fork_create_home', '/{repo_name}/fork',
|
|
1108
|
rmap.connect('repo_fork_create_home', '/{repo_name}/fork',
|
|
1048
|
controller='forks', action='fork_create',
|
|
1109
|
controller='forks', action='fork_create',
|
|
1049
|
conditions={'function': check_repo, 'method': ['POST']},
|
|
1110
|
conditions={'function': check_repo, 'method': ['POST']},
|
|
1050
|
requirements=URL_NAME_REQUIREMENTS)
|
|
1111
|
requirements=URL_NAME_REQUIREMENTS)
|
|
1051
|
|
|
1112
|
|
|
1052
|
rmap.connect('repo_fork_home', '/{repo_name}/fork',
|
|
1113
|
rmap.connect('repo_fork_home', '/{repo_name}/fork',
|
|
1053
|
controller='forks', action='fork',
|
|
1114
|
controller='forks', action='fork',
|
|
1054
|
conditions={'function': check_repo},
|
|
1115
|
conditions={'function': check_repo},
|
|
1055
|
requirements=URL_NAME_REQUIREMENTS)
|
|
1116
|
requirements=URL_NAME_REQUIREMENTS)
|
|
1056
|
|
|
1117
|
|
|
1057
|
rmap.connect('repo_forks_home', '/{repo_name}/forks',
|
|
1118
|
rmap.connect('repo_forks_home', '/{repo_name}/forks',
|
|
1058
|
controller='forks', action='forks',
|
|
1119
|
controller='forks', action='forks',
|
|
1059
|
conditions={'function': check_repo},
|
|
1120
|
conditions={'function': check_repo},
|
|
1060
|
requirements=URL_NAME_REQUIREMENTS)
|
|
1121
|
requirements=URL_NAME_REQUIREMENTS)
|
|
1061
|
|
|
1122
|
|
|
1062
|
rmap.connect('repo_followers_home', '/{repo_name}/followers',
|
|
1123
|
rmap.connect('repo_followers_home', '/{repo_name}/followers',
|
|
1063
|
controller='followers', action='followers',
|
|
1124
|
controller='followers', action='followers',
|
|
1064
|
conditions={'function': check_repo},
|
|
1125
|
conditions={'function': check_repo},
|
|
1065
|
requirements=URL_NAME_REQUIREMENTS)
|
|
1126
|
requirements=URL_NAME_REQUIREMENTS)
|
|
1066
|
|
|
1127
|
|
|
1067
|
# must be here for proper group/repo catching pattern
|
|
1128
|
# must be here for proper group/repo catching pattern
|
|
1068
|
_connect_with_slash(
|
|
1129
|
_connect_with_slash(
|
|
1069
|
rmap, 'repo_group_home', '/{group_name}',
|
|
1130
|
rmap, 'repo_group_home', '/{group_name}',
|
|
1070
|
controller='home', action='index_repo_group',
|
|
1131
|
controller='home', action='index_repo_group',
|
|
1071
|
conditions={'function': check_group},
|
|
1132
|
conditions={'function': check_group},
|
|
1072
|
requirements=URL_NAME_REQUIREMENTS)
|
|
1133
|
requirements=URL_NAME_REQUIREMENTS)
|
|
1073
|
|
|
1134
|
|
|
1074
|
# catch all, at the end
|
|
1135
|
# catch all, at the end
|
|
1075
|
_connect_with_slash(
|
|
1136
|
_connect_with_slash(
|
|
1076
|
rmap, 'summary_home', '/{repo_name}',
|
|
1137
|
rmap, 'summary_home', '/{repo_name}', jsroute=True,
|
|
1077
|
controller='summary', action='index',
|
|
1138
|
controller='summary', action='index',
|
|
1078
|
conditions={'function': check_repo},
|
|
1139
|
conditions={'function': check_repo},
|
|
1079
|
requirements=URL_NAME_REQUIREMENTS)
|
|
1140
|
requirements=URL_NAME_REQUIREMENTS)
|
|
1080
|
|
|
1141
|
|
|
|
|
|
1142
|
rmap.jsroutes()
|
|
1081
|
return rmap
|
|
1143
|
return rmap
|
|
1082
|
|
|
1144
|
|
|
1083
|
|
|
1145
|
|
|
1084
|
def _connect_with_slash(mapper, name, path, *args, **kwargs):
|
|
1146
|
def _connect_with_slash(mapper, name, path, *args, **kwargs):
|
|
1085
|
"""
|
|
1147
|
"""
|
|
1086
|
Connect a route with an optional trailing slash in `path`.
|
|
1148
|
Connect a route with an optional trailing slash in `path`.
|
|
1087
|
"""
|
|
1149
|
"""
|
|
1088
|
mapper.connect(name + '_slash', path + '/', *args, **kwargs)
|
|
1150
|
mapper.connect(name + '_slash', path + '/', *args, **kwargs)
|
|
1089
|
mapper.connect(name, path, *args, **kwargs)
|
|
1151
|
mapper.connect(name, path, *args, **kwargs)
|