|
@@
-32,7
+32,7
b' def make_map(config):'
|
|
32
|
32
|
return not cr(repo_name, config['base_path'])
|
|
33
|
33
|
|
|
34
|
34
|
#REST routes
|
|
35
|
|
with map.submapper(path_prefix='/_admin', controller='repos') as m:
|
|
|
35
|
with map.submapper(path_prefix='/_admin', controller='pylons_app.controllers.admin.repos:ReposController') as m:
|
|
36
|
36
|
m.connect("repos", "/repos",
|
|
37
|
37
|
action="create", conditions=dict(method=["POST"]))
|
|
38
|
38
|
m.connect("repos", "/repos",
|
|
@@
-67,11
+67,11
b' def make_map(config):'
|
|
67
|
67
|
action="delete_perm_user", conditions=dict(method=["DELETE"],
|
|
68
|
68
|
function=check_repo))
|
|
69
|
69
|
|
|
70
|
|
map.resource('user', 'users', path_prefix='/_admin')
|
|
71
|
|
map.resource('permission', 'permissions', path_prefix='/_admin')
|
|
|
70
|
map.resource('user', 'users', controller='pylons_app.controllers.admin.users:UsersController', path_prefix='/_admin')
|
|
|
71
|
map.resource('permission', 'permissions', controller='pylons_app.controllers.admin.permissions:PermissionsController', path_prefix='/_admin')
|
|
72
|
72
|
|
|
73
|
73
|
#ADMIN
|
|
74
|
|
with map.submapper(path_prefix='/_admin', controller='admin') as m:
|
|
|
74
|
with map.submapper(path_prefix='/_admin', controller='pylons_app.controllers.admin.admin:AdminController') as m:
|
|
75
|
75
|
m.connect('admin_home', '', action='index')#main page
|
|
76
|
76
|
m.connect('admin_add_repo', '/add_repo/{new_repo:[a-z0-9\. _-]*}',
|
|
77
|
77
|
action='add_repo')
|
|
@@
-84,9
+84,11
b' def make_map(config):'
|
|
84
|
84
|
controller='feed', action='atom',
|
|
85
|
85
|
conditions=dict(function=check_repo))
|
|
86
|
86
|
|
|
|
87
|
#LOGIN/LOGOUT
|
|
87
|
88
|
map.connect('login_home', '/login', controller='login')
|
|
88
|
89
|
map.connect('logout_home', '/logout', controller='login', action='logout')
|
|
89
|
90
|
|
|
|
91
|
#OTHERS
|
|
90
|
92
|
map.connect('changeset_home', '/{repo_name:.*}/changeset/{revision}',
|
|
91
|
93
|
controller='changeset', revision='tip',
|
|
92
|
94
|
conditions=dict(function=check_repo))
|