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