Show More
@@ -24,6 +24,53 b' from rhodecode.config.routing import ADM' | |||
|
24 | 24 | from rhodecode.lib.utils2 import str2bool |
|
25 | 25 | |
|
26 | 26 | |
|
27 | def admin_routes(config): | |
|
28 | """ | |
|
29 | Admin prefixed routes | |
|
30 | """ | |
|
31 | ||
|
32 | config.add_route( | |
|
33 | name='admin_settings_open_source', | |
|
34 | pattern='/settings/open_source') | |
|
35 | config.add_route( | |
|
36 | name='admin_settings_vcs_svn_generate_cfg', | |
|
37 | pattern='/settings/vcs/svn_generate_cfg') | |
|
38 | ||
|
39 | config.add_route( | |
|
40 | name='admin_settings_system', | |
|
41 | pattern='/settings/system') | |
|
42 | config.add_route( | |
|
43 | name='admin_settings_system_update', | |
|
44 | pattern='/settings/system/updates') | |
|
45 | ||
|
46 | config.add_route( | |
|
47 | name='admin_settings_sessions', | |
|
48 | pattern='/settings/sessions') | |
|
49 | config.add_route( | |
|
50 | name='admin_settings_sessions_cleanup', | |
|
51 | pattern='/settings/sessions/cleanup') | |
|
52 | ||
|
53 | # users admin | |
|
54 | config.add_route( | |
|
55 | name='users', | |
|
56 | pattern='/users') | |
|
57 | ||
|
58 | config.add_route( | |
|
59 | name='users_data', | |
|
60 | pattern='/users_data') | |
|
61 | ||
|
62 | # user auth tokens | |
|
63 | config.add_route( | |
|
64 | name='edit_user_auth_tokens', | |
|
65 | pattern='/users/{user_id:\d+}/edit/auth_tokens') | |
|
66 | config.add_route( | |
|
67 | name='edit_user_auth_tokens_add', | |
|
68 | pattern='/users/{user_id:\d+}/edit/auth_tokens/new') | |
|
69 | config.add_route( | |
|
70 | name='edit_user_auth_tokens_delete', | |
|
71 | pattern='/users/{user_id:\d+}/edit/auth_tokens/delete') | |
|
72 | ||
|
73 | ||
|
27 | 74 | def includeme(config): |
|
28 | 75 | settings = config.get_settings() |
|
29 | 76 | |
@@ -32,46 +79,7 b' def includeme(config):' | |||
|
32 | 79 | navigation_registry = NavigationRegistry(labs_active=labs_active) |
|
33 | 80 | config.registry.registerUtility(navigation_registry) |
|
34 | 81 | |
|
35 | config.add_route( | |
|
36 | name='admin_settings_open_source', | |
|
37 | pattern=ADMIN_PREFIX + '/settings/open_source') | |
|
38 | config.add_route( | |
|
39 | name='admin_settings_vcs_svn_generate_cfg', | |
|
40 | pattern=ADMIN_PREFIX + '/settings/vcs/svn_generate_cfg') | |
|
41 | ||
|
42 | config.add_route( | |
|
43 | name='admin_settings_system', | |
|
44 | pattern=ADMIN_PREFIX + '/settings/system') | |
|
45 | config.add_route( | |
|
46 | name='admin_settings_system_update', | |
|
47 | pattern=ADMIN_PREFIX + '/settings/system/updates') | |
|
48 | ||
|
49 | config.add_route( | |
|
50 | name='admin_settings_sessions', | |
|
51 | pattern=ADMIN_PREFIX + '/settings/sessions') | |
|
52 | config.add_route( | |
|
53 | name='admin_settings_sessions_cleanup', | |
|
54 | pattern=ADMIN_PREFIX + '/settings/sessions/cleanup') | |
|
55 | ||
|
56 | # users admin | |
|
57 | config.add_route( | |
|
58 | name='users', | |
|
59 | pattern=ADMIN_PREFIX + '/users') | |
|
60 | ||
|
61 | config.add_route( | |
|
62 | name='users_data', | |
|
63 | pattern=ADMIN_PREFIX + '/users_data') | |
|
64 | ||
|
65 | # user auth tokens | |
|
66 | config.add_route( | |
|
67 | name='edit_user_auth_tokens', | |
|
68 | pattern=ADMIN_PREFIX + '/users/{user_id:\d+}/edit/auth_tokens') | |
|
69 | config.add_route( | |
|
70 | name='edit_user_auth_tokens_add', | |
|
71 | pattern=ADMIN_PREFIX + '/users/{user_id:\d+}/edit/auth_tokens/new') | |
|
72 | config.add_route( | |
|
73 | name='edit_user_auth_tokens_delete', | |
|
74 | pattern=ADMIN_PREFIX + '/users/{user_id:\d+}/edit/auth_tokens/delete') | |
|
82 | config.include(admin_routes, route_prefix=ADMIN_PREFIX) | |
|
75 | 83 | |
|
76 | 84 | # Scan module for configuration decorators. |
|
77 | 85 | config.scan() |
General Comments 0
You need to be logged in to leave comments.
Login now