##// END OF EJS Templates
Fixed edit by groups names routing
marcink -
r2757:23e797c9 beta
parent child Browse files
Show More
@@ -1,580 +1,580 b''
1 1 """
2 2 Routes configuration
3 3
4 4 The more specific and detailed routes should be defined first so they
5 5 may take precedent over the more generic routes. For more information
6 6 refer to the routes manual at http://routes.groovie.org/docs/
7 7 """
8 8 from __future__ import with_statement
9 9 from routes import Mapper
10 10
11 11 # prefix for non repository related links needs to be prefixed with `/`
12 12 ADMIN_PREFIX = '/_admin'
13 13
14 14
15 15 def make_map(config):
16 16 """Create, configure and return the routes Mapper"""
17 17 rmap = Mapper(directory=config['pylons.paths']['controllers'],
18 18 always_scan=config['debug'])
19 19 rmap.minimization = False
20 20 rmap.explicit = False
21 21
22 22 from rhodecode.lib.utils import is_valid_repo
23 23 from rhodecode.lib.utils import is_valid_repos_group
24 24
25 25 def check_repo(environ, match_dict):
26 26 """
27 27 check for valid repository for proper 404 handling
28 28
29 29 :param environ:
30 30 :param match_dict:
31 31 """
32 32 from rhodecode.model.db import Repository
33 33 repo_name = match_dict.get('repo_name')
34 34
35 35 try:
36 36 by_id = repo_name.split('_')
37 37 if len(by_id) == 2 and by_id[1].isdigit():
38 38 repo_name = Repository.get(by_id[1]).repo_name
39 39 match_dict['repo_name'] = repo_name
40 40 except:
41 41 pass
42 42
43 43 return is_valid_repo(repo_name, config['base_path'])
44 44
45 45 def check_group(environ, match_dict):
46 46 """
47 47 check for valid repositories group for proper 404 handling
48 48
49 49 :param environ:
50 50 :param match_dict:
51 51 """
52 52 repos_group_name = match_dict.get('group_name')
53 53
54 54 return is_valid_repos_group(repos_group_name, config['base_path'])
55 55
56 56 def check_int(environ, match_dict):
57 57 return match_dict.get('id').isdigit()
58 58
59 59 # The ErrorController route (handles 404/500 error pages); it should
60 60 # likely stay at the top, ensuring it can always be resolved
61 61 rmap.connect('/error/{action}', controller='error')
62 62 rmap.connect('/error/{action}/{id}', controller='error')
63 63
64 64 #==========================================================================
65 65 # CUSTOM ROUTES HERE
66 66 #==========================================================================
67 67
68 68 #MAIN PAGE
69 69 rmap.connect('home', '/', controller='home', action='index')
70 70 rmap.connect('repo_switcher', '/repos', controller='home',
71 71 action='repo_switcher')
72 72 rmap.connect('branch_tag_switcher', '/branches-tags/{repo_name:.*?}',
73 73 controller='home', action='branch_tag_switcher')
74 74 rmap.connect('bugtracker',
75 75 "http://bitbucket.org/marcinkuzminski/rhodecode/issues",
76 76 _static=True)
77 77 rmap.connect('rst_help',
78 78 "http://docutils.sourceforge.net/docs/user/rst/quickref.html",
79 79 _static=True)
80 80 rmap.connect('rhodecode_official', "http://rhodecode.org", _static=True)
81 81
82 82 #ADMIN REPOSITORY REST ROUTES
83 83 with rmap.submapper(path_prefix=ADMIN_PREFIX,
84 84 controller='admin/repos') as m:
85 85 m.connect("repos", "/repos",
86 86 action="create", conditions=dict(method=["POST"]))
87 87 m.connect("repos", "/repos",
88 88 action="index", conditions=dict(method=["GET"]))
89 89 m.connect("formatted_repos", "/repos.{format}",
90 90 action="index",
91 91 conditions=dict(method=["GET"]))
92 92 m.connect("new_repo", "/repos/new",
93 93 action="new", conditions=dict(method=["GET"]))
94 94 m.connect("formatted_new_repo", "/repos/new.{format}",
95 95 action="new", conditions=dict(method=["GET"]))
96 96 m.connect("/repos/{repo_name:.*?}",
97 97 action="update", conditions=dict(method=["PUT"],
98 98 function=check_repo))
99 99 m.connect("/repos/{repo_name:.*?}",
100 100 action="delete", conditions=dict(method=["DELETE"],
101 101 function=check_repo))
102 102 m.connect("edit_repo", "/repos/{repo_name:.*?}/edit",
103 103 action="edit", conditions=dict(method=["GET"],
104 104 function=check_repo))
105 105 m.connect("formatted_edit_repo", "/repos/{repo_name:.*?}.{format}/edit",
106 106 action="edit", conditions=dict(method=["GET"],
107 107 function=check_repo))
108 108 m.connect("repo", "/repos/{repo_name:.*?}",
109 109 action="show", conditions=dict(method=["GET"],
110 110 function=check_repo))
111 111 m.connect("formatted_repo", "/repos/{repo_name:.*?}.{format}",
112 112 action="show", conditions=dict(method=["GET"],
113 113 function=check_repo))
114 114 #ajax delete repo perm user
115 115 m.connect('delete_repo_user', "/repos_delete_user/{repo_name:.*?}",
116 116 action="delete_perm_user",
117 117 conditions=dict(method=["DELETE"], function=check_repo))
118 118
119 119 #ajax delete repo perm users_group
120 120 m.connect('delete_repo_users_group',
121 121 "/repos_delete_users_group/{repo_name:.*?}",
122 122 action="delete_perm_users_group",
123 123 conditions=dict(method=["DELETE"], function=check_repo))
124 124
125 125 #settings actions
126 126 m.connect('repo_stats', "/repos_stats/{repo_name:.*?}",
127 127 action="repo_stats", conditions=dict(method=["DELETE"],
128 128 function=check_repo))
129 129 m.connect('repo_cache', "/repos_cache/{repo_name:.*?}",
130 130 action="repo_cache", conditions=dict(method=["DELETE"],
131 131 function=check_repo))
132 132 m.connect('repo_public_journal', "/repos_public_journal/{repo_name:.*?}",
133 133 action="repo_public_journal", conditions=dict(method=["PUT"],
134 134 function=check_repo))
135 135 m.connect('repo_pull', "/repo_pull/{repo_name:.*?}",
136 136 action="repo_pull", conditions=dict(method=["PUT"],
137 137 function=check_repo))
138 138 m.connect('repo_as_fork', "/repo_as_fork/{repo_name:.*?}",
139 139 action="repo_as_fork", conditions=dict(method=["PUT"],
140 140 function=check_repo))
141 141 m.connect('repo_locking', "/repo_locking/{repo_name:.*?}",
142 142 action="repo_locking", conditions=dict(method=["PUT"],
143 143 function=check_repo))
144 144 with rmap.submapper(path_prefix=ADMIN_PREFIX,
145 145 controller='admin/repos_groups') as m:
146 146 m.connect("repos_groups", "/repos_groups",
147 147 action="create", conditions=dict(method=["POST"]))
148 148 m.connect("repos_groups", "/repos_groups",
149 149 action="index", conditions=dict(method=["GET"]))
150 150 m.connect("formatted_repos_groups", "/repos_groups.{format}",
151 151 action="index", conditions=dict(method=["GET"]))
152 152 m.connect("new_repos_group", "/repos_groups/new",
153 153 action="new", conditions=dict(method=["GET"]))
154 154 m.connect("formatted_new_repos_group", "/repos_groups/new.{format}",
155 155 action="new", conditions=dict(method=["GET"]))
156 156 m.connect("update_repos_group", "/repos_groups/{id}",
157 157 action="update", conditions=dict(method=["PUT"],
158 158 function=check_int))
159 159 m.connect("delete_repos_group", "/repos_groups/{id}",
160 160 action="delete", conditions=dict(method=["DELETE"],
161 161 function=check_int))
162 m.connect("edit_repos_group", "/repos_groups/{id}/edit",
162 m.connect("edit_repos_group", "/repos_groups/{id:.*?}/edit",
163 163 action="edit", conditions=dict(method=["GET"],))
164 164 m.connect("formatted_edit_repos_group",
165 165 "/repos_groups/{id}.{format}/edit",
166 166 action="edit", conditions=dict(method=["GET"],
167 167 function=check_int))
168 168 m.connect("repos_group", "/repos_groups/{id}",
169 169 action="show", conditions=dict(method=["GET"],
170 170 function=check_int))
171 171 m.connect("formatted_repos_group", "/repos_groups/{id}.{format}",
172 172 action="show", conditions=dict(method=["GET"],
173 173 function=check_int))
174 174 # ajax delete repos group perm user
175 175 m.connect('delete_repos_group_user_perm',
176 176 "/delete_repos_group_user_perm/{group_name:.*}",
177 177 action="delete_repos_group_user_perm",
178 178 conditions=dict(method=["DELETE"], function=check_group))
179 179
180 180 # ajax delete repos group perm users_group
181 181 m.connect('delete_repos_group_users_group_perm',
182 182 "/delete_repos_group_users_group_perm/{group_name:.*}",
183 183 action="delete_repos_group_users_group_perm",
184 184 conditions=dict(method=["DELETE"], function=check_group))
185 185
186 186 #ADMIN USER REST ROUTES
187 187 with rmap.submapper(path_prefix=ADMIN_PREFIX,
188 188 controller='admin/users') as m:
189 189 m.connect("users", "/users",
190 190 action="create", conditions=dict(method=["POST"]))
191 191 m.connect("users", "/users",
192 192 action="index", conditions=dict(method=["GET"]))
193 193 m.connect("formatted_users", "/users.{format}",
194 194 action="index", conditions=dict(method=["GET"]))
195 195 m.connect("new_user", "/users/new",
196 196 action="new", conditions=dict(method=["GET"]))
197 197 m.connect("formatted_new_user", "/users/new.{format}",
198 198 action="new", conditions=dict(method=["GET"]))
199 199 m.connect("update_user", "/users/{id}",
200 200 action="update", conditions=dict(method=["PUT"]))
201 201 m.connect("delete_user", "/users/{id}",
202 202 action="delete", conditions=dict(method=["DELETE"]))
203 203 m.connect("edit_user", "/users/{id}/edit",
204 204 action="edit", conditions=dict(method=["GET"]))
205 205 m.connect("formatted_edit_user",
206 206 "/users/{id}.{format}/edit",
207 207 action="edit", conditions=dict(method=["GET"]))
208 208 m.connect("user", "/users/{id}",
209 209 action="show", conditions=dict(method=["GET"]))
210 210 m.connect("formatted_user", "/users/{id}.{format}",
211 211 action="show", conditions=dict(method=["GET"]))
212 212
213 213 #EXTRAS USER ROUTES
214 214 m.connect("user_perm", "/users_perm/{id}",
215 215 action="update_perm", conditions=dict(method=["PUT"]))
216 216 m.connect("user_emails", "/users_emails/{id}",
217 217 action="add_email", conditions=dict(method=["PUT"]))
218 218 m.connect("user_emails_delete", "/users_emails/{id}",
219 219 action="delete_email", conditions=dict(method=["DELETE"]))
220 220
221 221 #ADMIN USERS GROUPS REST ROUTES
222 222 with rmap.submapper(path_prefix=ADMIN_PREFIX,
223 223 controller='admin/users_groups') as m:
224 224 m.connect("users_groups", "/users_groups",
225 225 action="create", conditions=dict(method=["POST"]))
226 226 m.connect("users_groups", "/users_groups",
227 227 action="index", conditions=dict(method=["GET"]))
228 228 m.connect("formatted_users_groups", "/users_groups.{format}",
229 229 action="index", conditions=dict(method=["GET"]))
230 230 m.connect("new_users_group", "/users_groups/new",
231 231 action="new", conditions=dict(method=["GET"]))
232 232 m.connect("formatted_new_users_group", "/users_groups/new.{format}",
233 233 action="new", conditions=dict(method=["GET"]))
234 234 m.connect("update_users_group", "/users_groups/{id}",
235 235 action="update", conditions=dict(method=["PUT"]))
236 236 m.connect("delete_users_group", "/users_groups/{id}",
237 237 action="delete", conditions=dict(method=["DELETE"]))
238 238 m.connect("edit_users_group", "/users_groups/{id}/edit",
239 239 action="edit", conditions=dict(method=["GET"]))
240 240 m.connect("formatted_edit_users_group",
241 241 "/users_groups/{id}.{format}/edit",
242 242 action="edit", conditions=dict(method=["GET"]))
243 243 m.connect("users_group", "/users_groups/{id}",
244 244 action="show", conditions=dict(method=["GET"]))
245 245 m.connect("formatted_users_group", "/users_groups/{id}.{format}",
246 246 action="show", conditions=dict(method=["GET"]))
247 247
248 248 #EXTRAS USER ROUTES
249 249 m.connect("users_group_perm", "/users_groups_perm/{id}",
250 250 action="update_perm", conditions=dict(method=["PUT"]))
251 251
252 252 #ADMIN GROUP REST ROUTES
253 253 rmap.resource('group', 'groups',
254 254 controller='admin/groups', path_prefix=ADMIN_PREFIX)
255 255
256 256 #ADMIN PERMISSIONS REST ROUTES
257 257 rmap.resource('permission', 'permissions',
258 258 controller='admin/permissions', path_prefix=ADMIN_PREFIX)
259 259
260 260 ##ADMIN LDAP SETTINGS
261 261 rmap.connect('ldap_settings', '%s/ldap' % ADMIN_PREFIX,
262 262 controller='admin/ldap_settings', action='ldap_settings',
263 263 conditions=dict(method=["POST"]))
264 264
265 265 rmap.connect('ldap_home', '%s/ldap' % ADMIN_PREFIX,
266 266 controller='admin/ldap_settings')
267 267
268 268 #ADMIN SETTINGS REST ROUTES
269 269 with rmap.submapper(path_prefix=ADMIN_PREFIX,
270 270 controller='admin/settings') as m:
271 271 m.connect("admin_settings", "/settings",
272 272 action="create", conditions=dict(method=["POST"]))
273 273 m.connect("admin_settings", "/settings",
274 274 action="index", conditions=dict(method=["GET"]))
275 275 m.connect("formatted_admin_settings", "/settings.{format}",
276 276 action="index", conditions=dict(method=["GET"]))
277 277 m.connect("admin_new_setting", "/settings/new",
278 278 action="new", conditions=dict(method=["GET"]))
279 279 m.connect("formatted_admin_new_setting", "/settings/new.{format}",
280 280 action="new", conditions=dict(method=["GET"]))
281 281 m.connect("/settings/{setting_id}",
282 282 action="update", conditions=dict(method=["PUT"]))
283 283 m.connect("/settings/{setting_id}",
284 284 action="delete", conditions=dict(method=["DELETE"]))
285 285 m.connect("admin_edit_setting", "/settings/{setting_id}/edit",
286 286 action="edit", conditions=dict(method=["GET"]))
287 287 m.connect("formatted_admin_edit_setting",
288 288 "/settings/{setting_id}.{format}/edit",
289 289 action="edit", conditions=dict(method=["GET"]))
290 290 m.connect("admin_setting", "/settings/{setting_id}",
291 291 action="show", conditions=dict(method=["GET"]))
292 292 m.connect("formatted_admin_setting", "/settings/{setting_id}.{format}",
293 293 action="show", conditions=dict(method=["GET"]))
294 294 m.connect("admin_settings_my_account", "/my_account",
295 295 action="my_account", conditions=dict(method=["GET"]))
296 296 m.connect("admin_settings_my_account_update", "/my_account_update",
297 297 action="my_account_update", conditions=dict(method=["PUT"]))
298 298 m.connect("admin_settings_create_repository", "/create_repository",
299 299 action="create_repository", conditions=dict(method=["GET"]))
300 300 m.connect("admin_settings_my_repos", "/my_account/repos",
301 301 action="my_account_my_repos", conditions=dict(method=["GET"]))
302 302 m.connect("admin_settings_my_pullrequests", "/my_account/pull_requests",
303 303 action="my_account_my_pullrequests", conditions=dict(method=["GET"]))
304 304
305 305 #NOTIFICATION REST ROUTES
306 306 with rmap.submapper(path_prefix=ADMIN_PREFIX,
307 307 controller='admin/notifications') as m:
308 308 m.connect("notifications", "/notifications",
309 309 action="create", conditions=dict(method=["POST"]))
310 310 m.connect("notifications", "/notifications",
311 311 action="index", conditions=dict(method=["GET"]))
312 312 m.connect("notifications_mark_all_read", "/notifications/mark_all_read",
313 313 action="mark_all_read", conditions=dict(method=["GET"]))
314 314 m.connect("formatted_notifications", "/notifications.{format}",
315 315 action="index", conditions=dict(method=["GET"]))
316 316 m.connect("new_notification", "/notifications/new",
317 317 action="new", conditions=dict(method=["GET"]))
318 318 m.connect("formatted_new_notification", "/notifications/new.{format}",
319 319 action="new", conditions=dict(method=["GET"]))
320 320 m.connect("/notification/{notification_id}",
321 321 action="update", conditions=dict(method=["PUT"]))
322 322 m.connect("/notification/{notification_id}",
323 323 action="delete", conditions=dict(method=["DELETE"]))
324 324 m.connect("edit_notification", "/notification/{notification_id}/edit",
325 325 action="edit", conditions=dict(method=["GET"]))
326 326 m.connect("formatted_edit_notification",
327 327 "/notification/{notification_id}.{format}/edit",
328 328 action="edit", conditions=dict(method=["GET"]))
329 329 m.connect("notification", "/notification/{notification_id}",
330 330 action="show", conditions=dict(method=["GET"]))
331 331 m.connect("formatted_notification", "/notifications/{notification_id}.{format}",
332 332 action="show", conditions=dict(method=["GET"]))
333 333
334 334 #ADMIN MAIN PAGES
335 335 with rmap.submapper(path_prefix=ADMIN_PREFIX,
336 336 controller='admin/admin') as m:
337 337 m.connect('admin_home', '', action='index')
338 338 m.connect('admin_add_repo', '/add_repo/{new_repo:[a-z0-9\. _-]*}',
339 339 action='add_repo')
340 340
341 341 #==========================================================================
342 342 # API V2
343 343 #==========================================================================
344 344 with rmap.submapper(path_prefix=ADMIN_PREFIX,
345 345 controller='api/api') as m:
346 346 m.connect('api', '/api')
347 347
348 348 #USER JOURNAL
349 349 rmap.connect('journal', '%s/journal' % ADMIN_PREFIX,
350 350 controller='journal', action='index')
351 351 rmap.connect('journal_rss', '%s/journal/rss' % ADMIN_PREFIX,
352 352 controller='journal', action='journal_rss')
353 353 rmap.connect('journal_atom', '%s/journal/atom' % ADMIN_PREFIX,
354 354 controller='journal', action='journal_atom')
355 355
356 356 rmap.connect('public_journal', '%s/public_journal' % ADMIN_PREFIX,
357 357 controller='journal', action="public_journal")
358 358
359 359 rmap.connect('public_journal_rss', '%s/public_journal/rss' % ADMIN_PREFIX,
360 360 controller='journal', action="public_journal_rss")
361 361
362 362 rmap.connect('public_journal_rss_old', '%s/public_journal_rss' % ADMIN_PREFIX,
363 363 controller='journal', action="public_journal_rss")
364 364
365 365 rmap.connect('public_journal_atom',
366 366 '%s/public_journal/atom' % ADMIN_PREFIX, controller='journal',
367 367 action="public_journal_atom")
368 368
369 369 rmap.connect('public_journal_atom_old',
370 370 '%s/public_journal_atom' % ADMIN_PREFIX, controller='journal',
371 371 action="public_journal_atom")
372 372
373 373 rmap.connect('toggle_following', '%s/toggle_following' % ADMIN_PREFIX,
374 374 controller='journal', action='toggle_following',
375 375 conditions=dict(method=["POST"]))
376 376
377 377 #SEARCH
378 378 rmap.connect('search', '%s/search' % ADMIN_PREFIX, controller='search',)
379 379 rmap.connect('search_repo', '%s/search/{search_repo:.*}' % ADMIN_PREFIX,
380 380 controller='search')
381 381
382 382 #LOGIN/LOGOUT/REGISTER/SIGN IN
383 383 rmap.connect('login_home', '%s/login' % ADMIN_PREFIX, controller='login')
384 384 rmap.connect('logout_home', '%s/logout' % ADMIN_PREFIX, controller='login',
385 385 action='logout')
386 386
387 387 rmap.connect('register', '%s/register' % ADMIN_PREFIX, controller='login',
388 388 action='register')
389 389
390 390 rmap.connect('reset_password', '%s/password_reset' % ADMIN_PREFIX,
391 391 controller='login', action='password_reset')
392 392
393 393 rmap.connect('reset_password_confirmation',
394 394 '%s/password_reset_confirmation' % ADMIN_PREFIX,
395 395 controller='login', action='password_reset_confirmation')
396 396
397 397 #FEEDS
398 398 rmap.connect('rss_feed_home', '/{repo_name:.*?}/feed/rss',
399 399 controller='feed', action='rss',
400 400 conditions=dict(function=check_repo))
401 401
402 402 rmap.connect('atom_feed_home', '/{repo_name:.*?}/feed/atom',
403 403 controller='feed', action='atom',
404 404 conditions=dict(function=check_repo))
405 405
406 406 #==========================================================================
407 407 # REPOSITORY ROUTES
408 408 #==========================================================================
409 409 rmap.connect('summary_home', '/{repo_name:.*?}',
410 410 controller='summary',
411 411 conditions=dict(function=check_repo))
412 412
413 413 rmap.connect('repos_group_home', '/{group_name:.*}',
414 414 controller='admin/repos_groups', action="show_by_name",
415 415 conditions=dict(function=check_group))
416 416
417 417 rmap.connect('changeset_home', '/{repo_name:.*?}/changeset/{revision}',
418 418 controller='changeset', revision='tip',
419 419 conditions=dict(function=check_repo))
420 420
421 421 rmap.connect('changeset_comment',
422 422 '/{repo_name:.*?}/changeset/{revision}/comment',
423 423 controller='changeset', revision='tip', action='comment',
424 424 conditions=dict(function=check_repo))
425 425
426 426 rmap.connect('changeset_comment_delete',
427 427 '/{repo_name:.*?}/changeset/comment/{comment_id}/delete',
428 428 controller='changeset', action='delete_comment',
429 429 conditions=dict(function=check_repo, method=["DELETE"]))
430 430
431 431 rmap.connect('raw_changeset_home',
432 432 '/{repo_name:.*?}/raw-changeset/{revision}',
433 433 controller='changeset', action='raw_changeset',
434 434 revision='tip', conditions=dict(function=check_repo))
435 435
436 436 rmap.connect('compare_url',
437 437 '/{repo_name:.*?}/compare/{org_ref_type}@{org_ref}...{other_ref_type}@{other_ref}',
438 438 controller='compare', action='index',
439 439 conditions=dict(function=check_repo),
440 440 requirements=dict(
441 441 org_ref_type='(branch|book|tag|rev|org_ref_type)',
442 442 other_ref_type='(branch|book|tag|rev|other_ref_type)')
443 443 )
444 444
445 445 rmap.connect('pullrequest_home',
446 446 '/{repo_name:.*?}/pull-request/new', controller='pullrequests',
447 447 action='index', conditions=dict(function=check_repo,
448 448 method=["GET"]))
449 449
450 450 rmap.connect('pullrequest',
451 451 '/{repo_name:.*?}/pull-request/new', controller='pullrequests',
452 452 action='create', conditions=dict(function=check_repo,
453 453 method=["POST"]))
454 454
455 455 rmap.connect('pullrequest_show',
456 456 '/{repo_name:.*?}/pull-request/{pull_request_id}',
457 457 controller='pullrequests',
458 458 action='show', conditions=dict(function=check_repo,
459 459 method=["GET"]))
460 460 rmap.connect('pullrequest_update',
461 461 '/{repo_name:.*?}/pull-request/{pull_request_id}',
462 462 controller='pullrequests',
463 463 action='update', conditions=dict(function=check_repo,
464 464 method=["PUT"]))
465 465 rmap.connect('pullrequest_delete',
466 466 '/{repo_name:.*?}/pull-request/{pull_request_id}',
467 467 controller='pullrequests',
468 468 action='delete', conditions=dict(function=check_repo,
469 469 method=["DELETE"]))
470 470
471 471 rmap.connect('pullrequest_show_all',
472 472 '/{repo_name:.*?}/pull-request',
473 473 controller='pullrequests',
474 474 action='show_all', conditions=dict(function=check_repo,
475 475 method=["GET"]))
476 476
477 477 rmap.connect('pullrequest_comment',
478 478 '/{repo_name:.*?}/pull-request-comment/{pull_request_id}',
479 479 controller='pullrequests',
480 480 action='comment', conditions=dict(function=check_repo,
481 481 method=["POST"]))
482 482
483 483 rmap.connect('pullrequest_comment_delete',
484 484 '/{repo_name:.*?}/pull-request-comment/{comment_id}/delete',
485 485 controller='pullrequests', action='delete_comment',
486 486 conditions=dict(function=check_repo, method=["DELETE"]))
487 487
488 488 rmap.connect('summary_home', '/{repo_name:.*?}/summary',
489 489 controller='summary', conditions=dict(function=check_repo))
490 490
491 491 rmap.connect('shortlog_home', '/{repo_name:.*?}/shortlog',
492 492 controller='shortlog', conditions=dict(function=check_repo))
493 493
494 494 rmap.connect('branches_home', '/{repo_name:.*?}/branches',
495 495 controller='branches', conditions=dict(function=check_repo))
496 496
497 497 rmap.connect('tags_home', '/{repo_name:.*?}/tags',
498 498 controller='tags', conditions=dict(function=check_repo))
499 499
500 500 rmap.connect('bookmarks_home', '/{repo_name:.*?}/bookmarks',
501 501 controller='bookmarks', conditions=dict(function=check_repo))
502 502
503 503 rmap.connect('changelog_home', '/{repo_name:.*?}/changelog',
504 504 controller='changelog', conditions=dict(function=check_repo))
505 505
506 506 rmap.connect('changelog_details', '/{repo_name:.*?}/changelog_details/{cs}',
507 507 controller='changelog', action='changelog_details',
508 508 conditions=dict(function=check_repo))
509 509
510 510 rmap.connect('files_home', '/{repo_name:.*?}/files/{revision}/{f_path:.*}',
511 511 controller='files', revision='tip', f_path='',
512 512 conditions=dict(function=check_repo))
513 513
514 514 rmap.connect('files_diff_home', '/{repo_name:.*?}/diff/{f_path:.*}',
515 515 controller='files', action='diff', revision='tip', f_path='',
516 516 conditions=dict(function=check_repo))
517 517
518 518 rmap.connect('files_rawfile_home',
519 519 '/{repo_name:.*?}/rawfile/{revision}/{f_path:.*}',
520 520 controller='files', action='rawfile', revision='tip',
521 521 f_path='', conditions=dict(function=check_repo))
522 522
523 523 rmap.connect('files_raw_home',
524 524 '/{repo_name:.*?}/raw/{revision}/{f_path:.*}',
525 525 controller='files', action='raw', revision='tip', f_path='',
526 526 conditions=dict(function=check_repo))
527 527
528 528 rmap.connect('files_annotate_home',
529 529 '/{repo_name:.*?}/annotate/{revision}/{f_path:.*}',
530 530 controller='files', action='index', revision='tip',
531 531 f_path='', annotate=True, conditions=dict(function=check_repo))
532 532
533 533 rmap.connect('files_edit_home',
534 534 '/{repo_name:.*?}/edit/{revision}/{f_path:.*}',
535 535 controller='files', action='edit', revision='tip',
536 536 f_path='', conditions=dict(function=check_repo))
537 537
538 538 rmap.connect('files_add_home',
539 539 '/{repo_name:.*?}/add/{revision}/{f_path:.*}',
540 540 controller='files', action='add', revision='tip',
541 541 f_path='', conditions=dict(function=check_repo))
542 542
543 543 rmap.connect('files_archive_home', '/{repo_name:.*?}/archive/{fname}',
544 544 controller='files', action='archivefile',
545 545 conditions=dict(function=check_repo))
546 546
547 547 rmap.connect('files_nodelist_home',
548 548 '/{repo_name:.*?}/nodelist/{revision}/{f_path:.*}',
549 549 controller='files', action='nodelist',
550 550 conditions=dict(function=check_repo))
551 551
552 552 rmap.connect('repo_settings_delete', '/{repo_name:.*?}/settings',
553 553 controller='settings', action="delete",
554 554 conditions=dict(method=["DELETE"], function=check_repo))
555 555
556 556 rmap.connect('repo_settings_update', '/{repo_name:.*?}/settings',
557 557 controller='settings', action="update",
558 558 conditions=dict(method=["PUT"], function=check_repo))
559 559
560 560 rmap.connect('repo_settings_home', '/{repo_name:.*?}/settings',
561 561 controller='settings', action='index',
562 562 conditions=dict(function=check_repo))
563 563
564 564 rmap.connect('repo_fork_create_home', '/{repo_name:.*?}/fork',
565 565 controller='forks', action='fork_create',
566 566 conditions=dict(function=check_repo, method=["POST"]))
567 567
568 568 rmap.connect('repo_fork_home', '/{repo_name:.*?}/fork',
569 569 controller='forks', action='fork',
570 570 conditions=dict(function=check_repo))
571 571
572 572 rmap.connect('repo_forks_home', '/{repo_name:.*?}/forks',
573 573 controller='forks', action='forks',
574 574 conditions=dict(function=check_repo))
575 575
576 576 rmap.connect('repo_followers_home', '/{repo_name:.*?}/followers',
577 577 controller='followers', action='followers',
578 578 conditions=dict(function=check_repo))
579 579
580 580 return rmap
General Comments 0
You need to be logged in to leave comments. Login now