Show More
@@ -1,1124 +1,1124 b'' | |||||
1 | # Copyright (C) 2016-2023 RhodeCode GmbH |
|
1 | # Copyright (C) 2016-2023 RhodeCode GmbH | |
2 | # |
|
2 | # | |
3 | # This program is free software: you can redistribute it and/or modify |
|
3 | # This program is free software: you can redistribute it and/or modify | |
4 | # it under the terms of the GNU Affero General Public License, version 3 |
|
4 | # it under the terms of the GNU Affero General Public License, version 3 | |
5 | # (only), as published by the Free Software Foundation. |
|
5 | # (only), as published by the Free Software Foundation. | |
6 | # |
|
6 | # | |
7 | # This program is distributed in the hope that it will be useful, |
|
7 | # This program is distributed in the hope that it will be useful, | |
8 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
8 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
10 | # GNU General Public License for more details. |
|
10 | # GNU General Public License for more details. | |
11 | # |
|
11 | # | |
12 | # You should have received a copy of the GNU Affero General Public License |
|
12 | # You should have received a copy of the GNU Affero General Public License | |
13 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
13 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
14 | # |
|
14 | # | |
15 | # This program is dual-licensed. If you wish to learn more about the |
|
15 | # This program is dual-licensed. If you wish to learn more about the | |
16 | # RhodeCode Enterprise Edition, including its added features, Support services, |
|
16 | # RhodeCode Enterprise Edition, including its added features, Support services, | |
17 | # and proprietary license terms, please see https://rhodecode.com/licenses/ |
|
17 | # and proprietary license terms, please see https://rhodecode.com/licenses/ | |
18 |
|
18 | |||
19 |
|
19 | |||
20 | from rhodecode.apps._base import ADMIN_PREFIX |
|
20 | from rhodecode.apps._base import ADMIN_PREFIX | |
21 | from rhodecode.apps._base.navigation import includeme as nav_includeme |
|
21 | from rhodecode.apps._base.navigation import includeme as nav_includeme | |
22 | from rhodecode.apps.admin.views.main_views import AdminMainView |
|
22 | from rhodecode.apps.admin.views.main_views import AdminMainView | |
23 |
|
23 | |||
24 |
|
24 | |||
25 | def admin_routes(config): |
|
25 | def admin_routes(config): | |
26 | """ |
|
26 | """ | |
27 | Admin prefixed routes |
|
27 | Admin prefixed routes | |
28 | """ |
|
28 | """ | |
29 | from rhodecode.apps.admin.views.audit_logs import AdminAuditLogsView |
|
29 | from rhodecode.apps.admin.views.audit_logs import AdminAuditLogsView | |
30 | from rhodecode.apps.admin.views.artifacts import AdminArtifactsView |
|
30 | from rhodecode.apps.admin.views.artifacts import AdminArtifactsView | |
31 | from rhodecode.apps.admin.views.automation import AdminAutomationView |
|
31 | from rhodecode.apps.admin.views.automation import AdminAutomationView | |
32 | from rhodecode.apps.admin.views.scheduler import AdminSchedulerView |
|
32 | from rhodecode.apps.admin.views.scheduler import AdminSchedulerView | |
33 | from rhodecode.apps.admin.views.defaults import AdminDefaultSettingsView |
|
33 | from rhodecode.apps.admin.views.defaults import AdminDefaultSettingsView | |
34 | from rhodecode.apps.admin.views.exception_tracker import ExceptionsTrackerView |
|
34 | from rhodecode.apps.admin.views.exception_tracker import ExceptionsTrackerView | |
35 | from rhodecode.apps.admin.views.open_source_licenses import OpenSourceLicensesAdminSettingsView |
|
35 | from rhodecode.apps.admin.views.open_source_licenses import OpenSourceLicensesAdminSettingsView | |
36 | from rhodecode.apps.admin.views.permissions import AdminPermissionsView |
|
36 | from rhodecode.apps.admin.views.permissions import AdminPermissionsView | |
37 | from rhodecode.apps.admin.views.process_management import AdminProcessManagementView |
|
37 | from rhodecode.apps.admin.views.process_management import AdminProcessManagementView | |
38 | from rhodecode.apps.admin.views.repo_groups import AdminRepoGroupsView |
|
38 | from rhodecode.apps.admin.views.repo_groups import AdminRepoGroupsView | |
39 | from rhodecode.apps.admin.views.repositories import AdminReposView |
|
39 | from rhodecode.apps.admin.views.repositories import AdminReposView | |
40 | from rhodecode.apps.admin.views.sessions import AdminSessionSettingsView |
|
40 | from rhodecode.apps.admin.views.sessions import AdminSessionSettingsView | |
41 | from rhodecode.apps.admin.views.settings import AdminSettingsView |
|
41 | from rhodecode.apps.admin.views.settings import AdminSettingsView | |
42 | from rhodecode.apps.admin.views.svn_config import AdminSvnConfigView |
|
42 | from rhodecode.apps.admin.views.svn_config import AdminSvnConfigView | |
43 | from rhodecode.apps.admin.views.system_info import AdminSystemInfoSettingsView |
|
43 | from rhodecode.apps.admin.views.system_info import AdminSystemInfoSettingsView | |
44 | from rhodecode.apps.admin.views.user_groups import AdminUserGroupsView |
|
44 | from rhodecode.apps.admin.views.user_groups import AdminUserGroupsView | |
45 | from rhodecode.apps.admin.views.users import AdminUsersView, UsersView |
|
45 | from rhodecode.apps.admin.views.users import AdminUsersView, UsersView | |
46 | from rhodecode.apps.admin.views.security import AdminSecurityView |
|
46 | from rhodecode.apps.admin.views.security import AdminSecurityView | |
47 |
|
47 | |||
48 | # Security EE feature |
|
48 | # Security EE feature | |
49 |
|
49 | |||
50 | config.add_route( |
|
50 | config.add_route( | |
51 | 'admin_security', |
|
51 | 'admin_security', | |
52 | pattern='/security') |
|
52 | pattern='/security') | |
53 | config.add_view( |
|
53 | config.add_view( | |
54 | AdminSecurityView, |
|
54 | AdminSecurityView, | |
55 | attr='security', |
|
55 | attr='security', | |
56 | route_name='admin_security', request_method='GET', |
|
56 | route_name='admin_security', request_method='GET', | |
57 | renderer='rhodecode:templates/admin/security/security.mako') |
|
57 | renderer='rhodecode:templates/admin/security/security.mako') | |
58 |
|
58 | |||
59 | config.add_route( |
|
59 | config.add_route( | |
60 | name='admin_security_update', |
|
60 | name='admin_security_update', | |
61 | pattern='/security/update') |
|
61 | pattern='/security/update') | |
62 | config.add_view( |
|
62 | config.add_view( | |
63 | AdminSecurityView, |
|
63 | AdminSecurityView, | |
64 | attr='security_update', |
|
64 | attr='security_update', | |
65 | route_name='admin_security_update', request_method='POST', |
|
65 | route_name='admin_security_update', request_method='POST', | |
66 | renderer='rhodecode:templates/admin/security/security.mako') |
|
66 | renderer='rhodecode:templates/admin/security/security.mako') | |
67 |
|
67 | |||
68 | config.add_route( |
|
68 | config.add_route( | |
69 | name='admin_security_modify_allowed_vcs_client_versions', |
|
69 | name='admin_security_modify_allowed_vcs_client_versions', | |
70 | pattern='/security/modify/allowed_vcs_client_versions') |
|
70 | pattern=ADMIN_PREFIX + '/security/modify/allowed_vcs_client_versions') | |
71 | config.add_view( |
|
71 | config.add_view( | |
72 | AdminSecurityView, |
|
72 | AdminSecurityView, | |
73 | attr='vcs_whitelisted_client_versions_edit', |
|
73 | attr='vcs_whitelisted_client_versions_edit', | |
74 | route_name='admin_security_modify_allowed_vcs_client_versions', request_method=('GET', 'POST'), |
|
74 | route_name='admin_security_modify_allowed_vcs_client_versions', request_method=('GET', 'POST'), | |
75 | renderer='rhodecode:templates/admin/security/edit_allowed_vcs_client_versions.mako') |
|
75 | renderer='rhodecode:templates/admin/security/edit_allowed_vcs_client_versions.mako') | |
76 |
|
76 | |||
77 |
|
77 | |||
78 | config.add_route( |
|
78 | config.add_route( | |
79 | name='admin_audit_logs', |
|
79 | name='admin_audit_logs', | |
80 | pattern='/audit_logs') |
|
80 | pattern='/audit_logs') | |
81 | config.add_view( |
|
81 | config.add_view( | |
82 | AdminAuditLogsView, |
|
82 | AdminAuditLogsView, | |
83 | attr='admin_audit_logs', |
|
83 | attr='admin_audit_logs', | |
84 | route_name='admin_audit_logs', request_method='GET', |
|
84 | route_name='admin_audit_logs', request_method='GET', | |
85 | renderer='rhodecode:templates/admin/admin_audit_logs.mako') |
|
85 | renderer='rhodecode:templates/admin/admin_audit_logs.mako') | |
86 |
|
86 | |||
87 | config.add_route( |
|
87 | config.add_route( | |
88 | name='admin_audit_log_entry', |
|
88 | name='admin_audit_log_entry', | |
89 | pattern='/audit_logs/{audit_log_id}') |
|
89 | pattern='/audit_logs/{audit_log_id}') | |
90 | config.add_view( |
|
90 | config.add_view( | |
91 | AdminAuditLogsView, |
|
91 | AdminAuditLogsView, | |
92 | attr='admin_audit_log_entry', |
|
92 | attr='admin_audit_log_entry', | |
93 | route_name='admin_audit_log_entry', request_method='GET', |
|
93 | route_name='admin_audit_log_entry', request_method='GET', | |
94 | renderer='rhodecode:templates/admin/admin_audit_log_entry.mako') |
|
94 | renderer='rhodecode:templates/admin/admin_audit_log_entry.mako') | |
95 |
|
95 | |||
96 | # Artifacts EE feature |
|
96 | # Artifacts EE feature | |
97 | config.add_route( |
|
97 | config.add_route( | |
98 | 'admin_artifacts', |
|
98 | 'admin_artifacts', | |
99 | pattern=ADMIN_PREFIX + '/artifacts') |
|
99 | pattern=ADMIN_PREFIX + '/artifacts') | |
100 | config.add_route( |
|
100 | config.add_route( | |
101 | 'admin_artifacts_show_all', |
|
101 | 'admin_artifacts_show_all', | |
102 | pattern=ADMIN_PREFIX + '/artifacts') |
|
102 | pattern=ADMIN_PREFIX + '/artifacts') | |
103 | config.add_view( |
|
103 | config.add_view( | |
104 | AdminArtifactsView, |
|
104 | AdminArtifactsView, | |
105 | attr='artifacts', |
|
105 | attr='artifacts', | |
106 | route_name='admin_artifacts', request_method='GET', |
|
106 | route_name='admin_artifacts', request_method='GET', | |
107 | renderer='rhodecode:templates/admin/artifacts/artifacts.mako') |
|
107 | renderer='rhodecode:templates/admin/artifacts/artifacts.mako') | |
108 | config.add_view( |
|
108 | config.add_view( | |
109 | AdminArtifactsView, |
|
109 | AdminArtifactsView, | |
110 | attr='artifacts', |
|
110 | attr='artifacts', | |
111 | route_name='admin_artifacts_show_all', request_method='GET', |
|
111 | route_name='admin_artifacts_show_all', request_method='GET', | |
112 | renderer='rhodecode:templates/admin/artifacts/artifacts.mako') |
|
112 | renderer='rhodecode:templates/admin/artifacts/artifacts.mako') | |
113 |
|
113 | |||
114 | # EE views |
|
114 | # EE views | |
115 | config.add_route( |
|
115 | config.add_route( | |
116 | name='admin_artifacts_show_info', |
|
116 | name='admin_artifacts_show_info', | |
117 | pattern=ADMIN_PREFIX + '/artifacts/{uid}') |
|
117 | pattern=ADMIN_PREFIX + '/artifacts/{uid}') | |
118 | config.add_route( |
|
118 | config.add_route( | |
119 | name='admin_artifacts_delete', |
|
119 | name='admin_artifacts_delete', | |
120 | pattern=ADMIN_PREFIX + '/artifacts/{uid}/delete') |
|
120 | pattern=ADMIN_PREFIX + '/artifacts/{uid}/delete') | |
121 | config.add_route( |
|
121 | config.add_route( | |
122 | name='admin_artifacts_update', |
|
122 | name='admin_artifacts_update', | |
123 | pattern=ADMIN_PREFIX + '/artifacts/{uid}/update') |
|
123 | pattern=ADMIN_PREFIX + '/artifacts/{uid}/update') | |
124 |
|
124 | |||
125 | # Automation EE feature |
|
125 | # Automation EE feature | |
126 | config.add_route( |
|
126 | config.add_route( | |
127 | 'admin_automation', |
|
127 | 'admin_automation', | |
128 | pattern=ADMIN_PREFIX + '/automation') |
|
128 | pattern=ADMIN_PREFIX + '/automation') | |
129 | config.add_view( |
|
129 | config.add_view( | |
130 | AdminAutomationView, |
|
130 | AdminAutomationView, | |
131 | attr='automation', |
|
131 | attr='automation', | |
132 | route_name='admin_automation', request_method='GET', |
|
132 | route_name='admin_automation', request_method='GET', | |
133 | renderer='rhodecode:templates/admin/automation/automation.mako') |
|
133 | renderer='rhodecode:templates/admin/automation/automation.mako') | |
134 |
|
134 | |||
135 | # Scheduler EE feature |
|
135 | # Scheduler EE feature | |
136 | config.add_route( |
|
136 | config.add_route( | |
137 | 'admin_scheduler', |
|
137 | 'admin_scheduler', | |
138 | pattern=ADMIN_PREFIX + '/scheduler') |
|
138 | pattern=ADMIN_PREFIX + '/scheduler') | |
139 | config.add_view( |
|
139 | config.add_view( | |
140 | AdminSchedulerView, |
|
140 | AdminSchedulerView, | |
141 | attr='scheduler', |
|
141 | attr='scheduler', | |
142 | route_name='admin_scheduler', request_method='GET', |
|
142 | route_name='admin_scheduler', request_method='GET', | |
143 | renderer='rhodecode:templates/admin/scheduler/scheduler.mako') |
|
143 | renderer='rhodecode:templates/admin/scheduler/scheduler.mako') | |
144 |
|
144 | |||
145 | config.add_route( |
|
145 | config.add_route( | |
146 | name='admin_settings_open_source', |
|
146 | name='admin_settings_open_source', | |
147 | pattern='/settings/open_source') |
|
147 | pattern='/settings/open_source') | |
148 | config.add_view( |
|
148 | config.add_view( | |
149 | OpenSourceLicensesAdminSettingsView, |
|
149 | OpenSourceLicensesAdminSettingsView, | |
150 | attr='open_source_licenses', |
|
150 | attr='open_source_licenses', | |
151 | route_name='admin_settings_open_source', request_method='GET', |
|
151 | route_name='admin_settings_open_source', request_method='GET', | |
152 | renderer='rhodecode:templates/admin/settings/settings.mako') |
|
152 | renderer='rhodecode:templates/admin/settings/settings.mako') | |
153 |
|
153 | |||
154 | config.add_route( |
|
154 | config.add_route( | |
155 | name='admin_settings_vcs_svn_generate_cfg', |
|
155 | name='admin_settings_vcs_svn_generate_cfg', | |
156 | pattern='/settings/vcs/svn_generate_cfg') |
|
156 | pattern='/settings/vcs/svn_generate_cfg') | |
157 | config.add_view( |
|
157 | config.add_view( | |
158 | AdminSvnConfigView, |
|
158 | AdminSvnConfigView, | |
159 | attr='vcs_svn_generate_config', |
|
159 | attr='vcs_svn_generate_config', | |
160 | route_name='admin_settings_vcs_svn_generate_cfg', |
|
160 | route_name='admin_settings_vcs_svn_generate_cfg', | |
161 | request_method='POST', renderer='json') |
|
161 | request_method='POST', renderer='json') | |
162 |
|
162 | |||
163 | config.add_route( |
|
163 | config.add_route( | |
164 | name='admin_settings_system', |
|
164 | name='admin_settings_system', | |
165 | pattern='/settings/system') |
|
165 | pattern='/settings/system') | |
166 | config.add_view( |
|
166 | config.add_view( | |
167 | AdminSystemInfoSettingsView, |
|
167 | AdminSystemInfoSettingsView, | |
168 | attr='settings_system_info', |
|
168 | attr='settings_system_info', | |
169 | route_name='admin_settings_system', request_method='GET', |
|
169 | route_name='admin_settings_system', request_method='GET', | |
170 | renderer='rhodecode:templates/admin/settings/settings.mako') |
|
170 | renderer='rhodecode:templates/admin/settings/settings.mako') | |
171 |
|
171 | |||
172 | config.add_route( |
|
172 | config.add_route( | |
173 | name='admin_settings_system_update', |
|
173 | name='admin_settings_system_update', | |
174 | pattern='/settings/system/updates') |
|
174 | pattern='/settings/system/updates') | |
175 | config.add_view( |
|
175 | config.add_view( | |
176 | AdminSystemInfoSettingsView, |
|
176 | AdminSystemInfoSettingsView, | |
177 | attr='settings_system_info_check_update', |
|
177 | attr='settings_system_info_check_update', | |
178 | route_name='admin_settings_system_update', request_method='GET', |
|
178 | route_name='admin_settings_system_update', request_method='GET', | |
179 | renderer='rhodecode:templates/admin/settings/settings_system_update.mako') |
|
179 | renderer='rhodecode:templates/admin/settings/settings_system_update.mako') | |
180 |
|
180 | |||
181 | config.add_route( |
|
181 | config.add_route( | |
182 | name='admin_settings_exception_tracker', |
|
182 | name='admin_settings_exception_tracker', | |
183 | pattern='/settings/exceptions') |
|
183 | pattern='/settings/exceptions') | |
184 | config.add_view( |
|
184 | config.add_view( | |
185 | ExceptionsTrackerView, |
|
185 | ExceptionsTrackerView, | |
186 | attr='browse_exceptions', |
|
186 | attr='browse_exceptions', | |
187 | route_name='admin_settings_exception_tracker', request_method='GET', |
|
187 | route_name='admin_settings_exception_tracker', request_method='GET', | |
188 | renderer='rhodecode:templates/admin/settings/settings.mako') |
|
188 | renderer='rhodecode:templates/admin/settings/settings.mako') | |
189 |
|
189 | |||
190 | config.add_route( |
|
190 | config.add_route( | |
191 | name='admin_settings_exception_tracker_delete_all', |
|
191 | name='admin_settings_exception_tracker_delete_all', | |
192 | pattern='/settings/exceptions_delete_all') |
|
192 | pattern='/settings/exceptions_delete_all') | |
193 | config.add_view( |
|
193 | config.add_view( | |
194 | ExceptionsTrackerView, |
|
194 | ExceptionsTrackerView, | |
195 | attr='exception_delete_all', |
|
195 | attr='exception_delete_all', | |
196 | route_name='admin_settings_exception_tracker_delete_all', request_method='POST', |
|
196 | route_name='admin_settings_exception_tracker_delete_all', request_method='POST', | |
197 | renderer='rhodecode:templates/admin/settings/settings.mako') |
|
197 | renderer='rhodecode:templates/admin/settings/settings.mako') | |
198 |
|
198 | |||
199 | config.add_route( |
|
199 | config.add_route( | |
200 | name='admin_settings_exception_tracker_show', |
|
200 | name='admin_settings_exception_tracker_show', | |
201 | pattern='/settings/exceptions/{exception_id}') |
|
201 | pattern='/settings/exceptions/{exception_id}') | |
202 | config.add_view( |
|
202 | config.add_view( | |
203 | ExceptionsTrackerView, |
|
203 | ExceptionsTrackerView, | |
204 | attr='exception_show', |
|
204 | attr='exception_show', | |
205 | route_name='admin_settings_exception_tracker_show', request_method='GET', |
|
205 | route_name='admin_settings_exception_tracker_show', request_method='GET', | |
206 | renderer='rhodecode:templates/admin/settings/settings.mako') |
|
206 | renderer='rhodecode:templates/admin/settings/settings.mako') | |
207 |
|
207 | |||
208 | config.add_route( |
|
208 | config.add_route( | |
209 | name='admin_settings_exception_tracker_delete', |
|
209 | name='admin_settings_exception_tracker_delete', | |
210 | pattern='/settings/exceptions/{exception_id}/delete') |
|
210 | pattern='/settings/exceptions/{exception_id}/delete') | |
211 | config.add_view( |
|
211 | config.add_view( | |
212 | ExceptionsTrackerView, |
|
212 | ExceptionsTrackerView, | |
213 | attr='exception_delete', |
|
213 | attr='exception_delete', | |
214 | route_name='admin_settings_exception_tracker_delete', request_method='POST', |
|
214 | route_name='admin_settings_exception_tracker_delete', request_method='POST', | |
215 | renderer='rhodecode:templates/admin/settings/settings.mako') |
|
215 | renderer='rhodecode:templates/admin/settings/settings.mako') | |
216 |
|
216 | |||
217 | config.add_route( |
|
217 | config.add_route( | |
218 | name='admin_settings_sessions', |
|
218 | name='admin_settings_sessions', | |
219 | pattern='/settings/sessions') |
|
219 | pattern='/settings/sessions') | |
220 | config.add_view( |
|
220 | config.add_view( | |
221 | AdminSessionSettingsView, |
|
221 | AdminSessionSettingsView, | |
222 | attr='settings_sessions', |
|
222 | attr='settings_sessions', | |
223 | route_name='admin_settings_sessions', request_method='GET', |
|
223 | route_name='admin_settings_sessions', request_method='GET', | |
224 | renderer='rhodecode:templates/admin/settings/settings.mako') |
|
224 | renderer='rhodecode:templates/admin/settings/settings.mako') | |
225 |
|
225 | |||
226 | config.add_route( |
|
226 | config.add_route( | |
227 | name='admin_settings_sessions_cleanup', |
|
227 | name='admin_settings_sessions_cleanup', | |
228 | pattern='/settings/sessions/cleanup') |
|
228 | pattern='/settings/sessions/cleanup') | |
229 | config.add_view( |
|
229 | config.add_view( | |
230 | AdminSessionSettingsView, |
|
230 | AdminSessionSettingsView, | |
231 | attr='settings_sessions_cleanup', |
|
231 | attr='settings_sessions_cleanup', | |
232 | route_name='admin_settings_sessions_cleanup', request_method='POST') |
|
232 | route_name='admin_settings_sessions_cleanup', request_method='POST') | |
233 |
|
233 | |||
234 | config.add_route( |
|
234 | config.add_route( | |
235 | name='admin_settings_process_management', |
|
235 | name='admin_settings_process_management', | |
236 | pattern='/settings/process_management') |
|
236 | pattern='/settings/process_management') | |
237 | config.add_view( |
|
237 | config.add_view( | |
238 | AdminProcessManagementView, |
|
238 | AdminProcessManagementView, | |
239 | attr='process_management', |
|
239 | attr='process_management', | |
240 | route_name='admin_settings_process_management', request_method='GET', |
|
240 | route_name='admin_settings_process_management', request_method='GET', | |
241 | renderer='rhodecode:templates/admin/settings/settings.mako') |
|
241 | renderer='rhodecode:templates/admin/settings/settings.mako') | |
242 |
|
242 | |||
243 | config.add_route( |
|
243 | config.add_route( | |
244 | name='admin_settings_process_management_data', |
|
244 | name='admin_settings_process_management_data', | |
245 | pattern='/settings/process_management/data') |
|
245 | pattern='/settings/process_management/data') | |
246 | config.add_view( |
|
246 | config.add_view( | |
247 | AdminProcessManagementView, |
|
247 | AdminProcessManagementView, | |
248 | attr='process_management_data', |
|
248 | attr='process_management_data', | |
249 | route_name='admin_settings_process_management_data', request_method='GET', |
|
249 | route_name='admin_settings_process_management_data', request_method='GET', | |
250 | renderer='rhodecode:templates/admin/settings/settings_process_management_data.mako') |
|
250 | renderer='rhodecode:templates/admin/settings/settings_process_management_data.mako') | |
251 |
|
251 | |||
252 | config.add_route( |
|
252 | config.add_route( | |
253 | name='admin_settings_process_management_signal', |
|
253 | name='admin_settings_process_management_signal', | |
254 | pattern='/settings/process_management/signal') |
|
254 | pattern='/settings/process_management/signal') | |
255 | config.add_view( |
|
255 | config.add_view( | |
256 | AdminProcessManagementView, |
|
256 | AdminProcessManagementView, | |
257 | attr='process_management_signal', |
|
257 | attr='process_management_signal', | |
258 | route_name='admin_settings_process_management_signal', |
|
258 | route_name='admin_settings_process_management_signal', | |
259 | request_method='POST', renderer='json_ext') |
|
259 | request_method='POST', renderer='json_ext') | |
260 |
|
260 | |||
261 | config.add_route( |
|
261 | config.add_route( | |
262 | name='admin_settings_process_management_master_signal', |
|
262 | name='admin_settings_process_management_master_signal', | |
263 | pattern='/settings/process_management/master_signal') |
|
263 | pattern='/settings/process_management/master_signal') | |
264 | config.add_view( |
|
264 | config.add_view( | |
265 | AdminProcessManagementView, |
|
265 | AdminProcessManagementView, | |
266 | attr='process_management_master_signal', |
|
266 | attr='process_management_master_signal', | |
267 | route_name='admin_settings_process_management_master_signal', |
|
267 | route_name='admin_settings_process_management_master_signal', | |
268 | request_method='POST', renderer='json_ext') |
|
268 | request_method='POST', renderer='json_ext') | |
269 |
|
269 | |||
270 | # default settings |
|
270 | # default settings | |
271 | config.add_route( |
|
271 | config.add_route( | |
272 | name='admin_defaults_repositories', |
|
272 | name='admin_defaults_repositories', | |
273 | pattern='/defaults/repositories') |
|
273 | pattern='/defaults/repositories') | |
274 | config.add_view( |
|
274 | config.add_view( | |
275 | AdminDefaultSettingsView, |
|
275 | AdminDefaultSettingsView, | |
276 | attr='defaults_repository_show', |
|
276 | attr='defaults_repository_show', | |
277 | route_name='admin_defaults_repositories', request_method='GET', |
|
277 | route_name='admin_defaults_repositories', request_method='GET', | |
278 | renderer='rhodecode:templates/admin/defaults/defaults.mako') |
|
278 | renderer='rhodecode:templates/admin/defaults/defaults.mako') | |
279 |
|
279 | |||
280 | config.add_route( |
|
280 | config.add_route( | |
281 | name='admin_defaults_repositories_update', |
|
281 | name='admin_defaults_repositories_update', | |
282 | pattern='/defaults/repositories/update') |
|
282 | pattern='/defaults/repositories/update') | |
283 | config.add_view( |
|
283 | config.add_view( | |
284 | AdminDefaultSettingsView, |
|
284 | AdminDefaultSettingsView, | |
285 | attr='defaults_repository_update', |
|
285 | attr='defaults_repository_update', | |
286 | route_name='admin_defaults_repositories_update', request_method='POST', |
|
286 | route_name='admin_defaults_repositories_update', request_method='POST', | |
287 | renderer='rhodecode:templates/admin/defaults/defaults.mako') |
|
287 | renderer='rhodecode:templates/admin/defaults/defaults.mako') | |
288 |
|
288 | |||
289 | # admin settings |
|
289 | # admin settings | |
290 |
|
290 | |||
291 | config.add_route( |
|
291 | config.add_route( | |
292 | name='admin_settings', |
|
292 | name='admin_settings', | |
293 | pattern='/settings') |
|
293 | pattern='/settings') | |
294 | config.add_view( |
|
294 | config.add_view( | |
295 | AdminSettingsView, |
|
295 | AdminSettingsView, | |
296 | attr='settings_global', |
|
296 | attr='settings_global', | |
297 | route_name='admin_settings', request_method='GET', |
|
297 | route_name='admin_settings', request_method='GET', | |
298 | renderer='rhodecode:templates/admin/settings/settings.mako') |
|
298 | renderer='rhodecode:templates/admin/settings/settings.mako') | |
299 |
|
299 | |||
300 | config.add_route( |
|
300 | config.add_route( | |
301 | name='admin_settings_update', |
|
301 | name='admin_settings_update', | |
302 | pattern='/settings/update') |
|
302 | pattern='/settings/update') | |
303 | config.add_view( |
|
303 | config.add_view( | |
304 | AdminSettingsView, |
|
304 | AdminSettingsView, | |
305 | attr='settings_global_update', |
|
305 | attr='settings_global_update', | |
306 | route_name='admin_settings_update', request_method='POST', |
|
306 | route_name='admin_settings_update', request_method='POST', | |
307 | renderer='rhodecode:templates/admin/settings/settings.mako') |
|
307 | renderer='rhodecode:templates/admin/settings/settings.mako') | |
308 |
|
308 | |||
309 | config.add_route( |
|
309 | config.add_route( | |
310 | name='admin_settings_global', |
|
310 | name='admin_settings_global', | |
311 | pattern='/settings/global') |
|
311 | pattern='/settings/global') | |
312 | config.add_view( |
|
312 | config.add_view( | |
313 | AdminSettingsView, |
|
313 | AdminSettingsView, | |
314 | attr='settings_global', |
|
314 | attr='settings_global', | |
315 | route_name='admin_settings_global', request_method='GET', |
|
315 | route_name='admin_settings_global', request_method='GET', | |
316 | renderer='rhodecode:templates/admin/settings/settings.mako') |
|
316 | renderer='rhodecode:templates/admin/settings/settings.mako') | |
317 |
|
317 | |||
318 | config.add_route( |
|
318 | config.add_route( | |
319 | name='admin_settings_global_update', |
|
319 | name='admin_settings_global_update', | |
320 | pattern='/settings/global/update') |
|
320 | pattern='/settings/global/update') | |
321 | config.add_view( |
|
321 | config.add_view( | |
322 | AdminSettingsView, |
|
322 | AdminSettingsView, | |
323 | attr='settings_global_update', |
|
323 | attr='settings_global_update', | |
324 | route_name='admin_settings_global_update', request_method='POST', |
|
324 | route_name='admin_settings_global_update', request_method='POST', | |
325 | renderer='rhodecode:templates/admin/settings/settings.mako') |
|
325 | renderer='rhodecode:templates/admin/settings/settings.mako') | |
326 |
|
326 | |||
327 | config.add_route( |
|
327 | config.add_route( | |
328 | name='admin_settings_vcs', |
|
328 | name='admin_settings_vcs', | |
329 | pattern='/settings/vcs') |
|
329 | pattern='/settings/vcs') | |
330 | config.add_view( |
|
330 | config.add_view( | |
331 | AdminSettingsView, |
|
331 | AdminSettingsView, | |
332 | attr='settings_vcs', |
|
332 | attr='settings_vcs', | |
333 | route_name='admin_settings_vcs', request_method='GET', |
|
333 | route_name='admin_settings_vcs', request_method='GET', | |
334 | renderer='rhodecode:templates/admin/settings/settings.mako') |
|
334 | renderer='rhodecode:templates/admin/settings/settings.mako') | |
335 |
|
335 | |||
336 | config.add_route( |
|
336 | config.add_route( | |
337 | name='admin_settings_vcs_update', |
|
337 | name='admin_settings_vcs_update', | |
338 | pattern='/settings/vcs/update') |
|
338 | pattern='/settings/vcs/update') | |
339 | config.add_view( |
|
339 | config.add_view( | |
340 | AdminSettingsView, |
|
340 | AdminSettingsView, | |
341 | attr='settings_vcs_update', |
|
341 | attr='settings_vcs_update', | |
342 | route_name='admin_settings_vcs_update', request_method='POST', |
|
342 | route_name='admin_settings_vcs_update', request_method='POST', | |
343 | renderer='rhodecode:templates/admin/settings/settings.mako') |
|
343 | renderer='rhodecode:templates/admin/settings/settings.mako') | |
344 |
|
344 | |||
345 | config.add_route( |
|
345 | config.add_route( | |
346 | name='admin_settings_vcs_svn_pattern_delete', |
|
346 | name='admin_settings_vcs_svn_pattern_delete', | |
347 | pattern='/settings/vcs/svn_pattern_delete') |
|
347 | pattern='/settings/vcs/svn_pattern_delete') | |
348 | config.add_view( |
|
348 | config.add_view( | |
349 | AdminSettingsView, |
|
349 | AdminSettingsView, | |
350 | attr='settings_vcs_delete_svn_pattern', |
|
350 | attr='settings_vcs_delete_svn_pattern', | |
351 | route_name='admin_settings_vcs_svn_pattern_delete', request_method='POST', |
|
351 | route_name='admin_settings_vcs_svn_pattern_delete', request_method='POST', | |
352 | renderer='json_ext', xhr=True) |
|
352 | renderer='json_ext', xhr=True) | |
353 |
|
353 | |||
354 | config.add_route( |
|
354 | config.add_route( | |
355 | name='admin_settings_mapping', |
|
355 | name='admin_settings_mapping', | |
356 | pattern='/settings/mapping') |
|
356 | pattern='/settings/mapping') | |
357 | config.add_view( |
|
357 | config.add_view( | |
358 | AdminSettingsView, |
|
358 | AdminSettingsView, | |
359 | attr='settings_mapping', |
|
359 | attr='settings_mapping', | |
360 | route_name='admin_settings_mapping', request_method='GET', |
|
360 | route_name='admin_settings_mapping', request_method='GET', | |
361 | renderer='rhodecode:templates/admin/settings/settings.mako') |
|
361 | renderer='rhodecode:templates/admin/settings/settings.mako') | |
362 |
|
362 | |||
363 | config.add_route( |
|
363 | config.add_route( | |
364 | name='admin_settings_mapping_update', |
|
364 | name='admin_settings_mapping_update', | |
365 | pattern='/settings/mapping/update') |
|
365 | pattern='/settings/mapping/update') | |
366 | config.add_view( |
|
366 | config.add_view( | |
367 | AdminSettingsView, |
|
367 | AdminSettingsView, | |
368 | attr='settings_mapping_update', |
|
368 | attr='settings_mapping_update', | |
369 | route_name='admin_settings_mapping_update', request_method='POST', |
|
369 | route_name='admin_settings_mapping_update', request_method='POST', | |
370 | renderer='rhodecode:templates/admin/settings/settings.mako') |
|
370 | renderer='rhodecode:templates/admin/settings/settings.mako') | |
371 |
|
371 | |||
372 | config.add_route( |
|
372 | config.add_route( | |
373 | name='admin_settings_visual', |
|
373 | name='admin_settings_visual', | |
374 | pattern='/settings/visual') |
|
374 | pattern='/settings/visual') | |
375 | config.add_view( |
|
375 | config.add_view( | |
376 | AdminSettingsView, |
|
376 | AdminSettingsView, | |
377 | attr='settings_visual', |
|
377 | attr='settings_visual', | |
378 | route_name='admin_settings_visual', request_method='GET', |
|
378 | route_name='admin_settings_visual', request_method='GET', | |
379 | renderer='rhodecode:templates/admin/settings/settings.mako') |
|
379 | renderer='rhodecode:templates/admin/settings/settings.mako') | |
380 |
|
380 | |||
381 | config.add_route( |
|
381 | config.add_route( | |
382 | name='admin_settings_visual_update', |
|
382 | name='admin_settings_visual_update', | |
383 | pattern='/settings/visual/update') |
|
383 | pattern='/settings/visual/update') | |
384 | config.add_view( |
|
384 | config.add_view( | |
385 | AdminSettingsView, |
|
385 | AdminSettingsView, | |
386 | attr='settings_visual_update', |
|
386 | attr='settings_visual_update', | |
387 | route_name='admin_settings_visual_update', request_method='POST', |
|
387 | route_name='admin_settings_visual_update', request_method='POST', | |
388 | renderer='rhodecode:templates/admin/settings/settings.mako') |
|
388 | renderer='rhodecode:templates/admin/settings/settings.mako') | |
389 |
|
389 | |||
390 | config.add_route( |
|
390 | config.add_route( | |
391 | name='admin_settings_issuetracker', |
|
391 | name='admin_settings_issuetracker', | |
392 | pattern='/settings/issue-tracker') |
|
392 | pattern='/settings/issue-tracker') | |
393 | config.add_view( |
|
393 | config.add_view( | |
394 | AdminSettingsView, |
|
394 | AdminSettingsView, | |
395 | attr='settings_issuetracker', |
|
395 | attr='settings_issuetracker', | |
396 | route_name='admin_settings_issuetracker', request_method='GET', |
|
396 | route_name='admin_settings_issuetracker', request_method='GET', | |
397 | renderer='rhodecode:templates/admin/settings/settings.mako') |
|
397 | renderer='rhodecode:templates/admin/settings/settings.mako') | |
398 |
|
398 | |||
399 | config.add_route( |
|
399 | config.add_route( | |
400 | name='admin_settings_issuetracker_update', |
|
400 | name='admin_settings_issuetracker_update', | |
401 | pattern='/settings/issue-tracker/update') |
|
401 | pattern='/settings/issue-tracker/update') | |
402 | config.add_view( |
|
402 | config.add_view( | |
403 | AdminSettingsView, |
|
403 | AdminSettingsView, | |
404 | attr='settings_issuetracker_update', |
|
404 | attr='settings_issuetracker_update', | |
405 | route_name='admin_settings_issuetracker_update', request_method='POST', |
|
405 | route_name='admin_settings_issuetracker_update', request_method='POST', | |
406 | renderer='rhodecode:templates/admin/settings/settings.mako') |
|
406 | renderer='rhodecode:templates/admin/settings/settings.mako') | |
407 |
|
407 | |||
408 | config.add_route( |
|
408 | config.add_route( | |
409 | name='admin_settings_issuetracker_test', |
|
409 | name='admin_settings_issuetracker_test', | |
410 | pattern='/settings/issue-tracker/test') |
|
410 | pattern='/settings/issue-tracker/test') | |
411 | config.add_view( |
|
411 | config.add_view( | |
412 | AdminSettingsView, |
|
412 | AdminSettingsView, | |
413 | attr='settings_issuetracker_test', |
|
413 | attr='settings_issuetracker_test', | |
414 | route_name='admin_settings_issuetracker_test', request_method='POST', |
|
414 | route_name='admin_settings_issuetracker_test', request_method='POST', | |
415 | renderer='string', xhr=True) |
|
415 | renderer='string', xhr=True) | |
416 |
|
416 | |||
417 | config.add_route( |
|
417 | config.add_route( | |
418 | name='admin_settings_issuetracker_delete', |
|
418 | name='admin_settings_issuetracker_delete', | |
419 | pattern='/settings/issue-tracker/delete') |
|
419 | pattern='/settings/issue-tracker/delete') | |
420 | config.add_view( |
|
420 | config.add_view( | |
421 | AdminSettingsView, |
|
421 | AdminSettingsView, | |
422 | attr='settings_issuetracker_delete', |
|
422 | attr='settings_issuetracker_delete', | |
423 | route_name='admin_settings_issuetracker_delete', request_method='POST', |
|
423 | route_name='admin_settings_issuetracker_delete', request_method='POST', | |
424 | renderer='json_ext', xhr=True) |
|
424 | renderer='json_ext', xhr=True) | |
425 |
|
425 | |||
426 | config.add_route( |
|
426 | config.add_route( | |
427 | name='admin_settings_email', |
|
427 | name='admin_settings_email', | |
428 | pattern='/settings/email') |
|
428 | pattern='/settings/email') | |
429 | config.add_view( |
|
429 | config.add_view( | |
430 | AdminSettingsView, |
|
430 | AdminSettingsView, | |
431 | attr='settings_email', |
|
431 | attr='settings_email', | |
432 | route_name='admin_settings_email', request_method='GET', |
|
432 | route_name='admin_settings_email', request_method='GET', | |
433 | renderer='rhodecode:templates/admin/settings/settings.mako') |
|
433 | renderer='rhodecode:templates/admin/settings/settings.mako') | |
434 |
|
434 | |||
435 | config.add_route( |
|
435 | config.add_route( | |
436 | name='admin_settings_email_update', |
|
436 | name='admin_settings_email_update', | |
437 | pattern='/settings/email/update') |
|
437 | pattern='/settings/email/update') | |
438 | config.add_view( |
|
438 | config.add_view( | |
439 | AdminSettingsView, |
|
439 | AdminSettingsView, | |
440 | attr='settings_email_update', |
|
440 | attr='settings_email_update', | |
441 | route_name='admin_settings_email_update', request_method='POST', |
|
441 | route_name='admin_settings_email_update', request_method='POST', | |
442 | renderer='rhodecode:templates/admin/settings/settings.mako') |
|
442 | renderer='rhodecode:templates/admin/settings/settings.mako') | |
443 |
|
443 | |||
444 | config.add_route( |
|
444 | config.add_route( | |
445 | name='admin_settings_hooks', |
|
445 | name='admin_settings_hooks', | |
446 | pattern='/settings/hooks') |
|
446 | pattern='/settings/hooks') | |
447 | config.add_view( |
|
447 | config.add_view( | |
448 | AdminSettingsView, |
|
448 | AdminSettingsView, | |
449 | attr='settings_hooks', |
|
449 | attr='settings_hooks', | |
450 | route_name='admin_settings_hooks', request_method='GET', |
|
450 | route_name='admin_settings_hooks', request_method='GET', | |
451 | renderer='rhodecode:templates/admin/settings/settings.mako') |
|
451 | renderer='rhodecode:templates/admin/settings/settings.mako') | |
452 |
|
452 | |||
453 | config.add_route( |
|
453 | config.add_route( | |
454 | name='admin_settings_hooks_update', |
|
454 | name='admin_settings_hooks_update', | |
455 | pattern='/settings/hooks/update') |
|
455 | pattern='/settings/hooks/update') | |
456 | config.add_view( |
|
456 | config.add_view( | |
457 | AdminSettingsView, |
|
457 | AdminSettingsView, | |
458 | attr='settings_hooks_update', |
|
458 | attr='settings_hooks_update', | |
459 | route_name='admin_settings_hooks_update', request_method='POST', |
|
459 | route_name='admin_settings_hooks_update', request_method='POST', | |
460 | renderer='rhodecode:templates/admin/settings/settings.mako') |
|
460 | renderer='rhodecode:templates/admin/settings/settings.mako') | |
461 |
|
461 | |||
462 | config.add_route( |
|
462 | config.add_route( | |
463 | name='admin_settings_hooks_delete', |
|
463 | name='admin_settings_hooks_delete', | |
464 | pattern='/settings/hooks/delete') |
|
464 | pattern='/settings/hooks/delete') | |
465 | config.add_view( |
|
465 | config.add_view( | |
466 | AdminSettingsView, |
|
466 | AdminSettingsView, | |
467 | attr='settings_hooks_update', |
|
467 | attr='settings_hooks_update', | |
468 | route_name='admin_settings_hooks_delete', request_method='POST', |
|
468 | route_name='admin_settings_hooks_delete', request_method='POST', | |
469 | renderer='rhodecode:templates/admin/settings/settings.mako') |
|
469 | renderer='rhodecode:templates/admin/settings/settings.mako') | |
470 |
|
470 | |||
471 | config.add_route( |
|
471 | config.add_route( | |
472 | name='admin_settings_search', |
|
472 | name='admin_settings_search', | |
473 | pattern='/settings/search') |
|
473 | pattern='/settings/search') | |
474 | config.add_view( |
|
474 | config.add_view( | |
475 | AdminSettingsView, |
|
475 | AdminSettingsView, | |
476 | attr='settings_search', |
|
476 | attr='settings_search', | |
477 | route_name='admin_settings_search', request_method='GET', |
|
477 | route_name='admin_settings_search', request_method='GET', | |
478 | renderer='rhodecode:templates/admin/settings/settings.mako') |
|
478 | renderer='rhodecode:templates/admin/settings/settings.mako') | |
479 |
|
479 | |||
480 | config.add_route( |
|
480 | config.add_route( | |
481 | name='admin_settings_labs', |
|
481 | name='admin_settings_labs', | |
482 | pattern='/settings/labs') |
|
482 | pattern='/settings/labs') | |
483 | config.add_view( |
|
483 | config.add_view( | |
484 | AdminSettingsView, |
|
484 | AdminSettingsView, | |
485 | attr='settings_labs', |
|
485 | attr='settings_labs', | |
486 | route_name='admin_settings_labs', request_method='GET', |
|
486 | route_name='admin_settings_labs', request_method='GET', | |
487 | renderer='rhodecode:templates/admin/settings/settings.mako') |
|
487 | renderer='rhodecode:templates/admin/settings/settings.mako') | |
488 |
|
488 | |||
489 | config.add_route( |
|
489 | config.add_route( | |
490 | name='admin_settings_labs_update', |
|
490 | name='admin_settings_labs_update', | |
491 | pattern='/settings/labs/update') |
|
491 | pattern='/settings/labs/update') | |
492 | config.add_view( |
|
492 | config.add_view( | |
493 | AdminSettingsView, |
|
493 | AdminSettingsView, | |
494 | attr='settings_labs_update', |
|
494 | attr='settings_labs_update', | |
495 | route_name='admin_settings_labs_update', request_method='POST', |
|
495 | route_name='admin_settings_labs_update', request_method='POST', | |
496 | renderer='rhodecode:templates/admin/settings/settings.mako') |
|
496 | renderer='rhodecode:templates/admin/settings/settings.mako') | |
497 |
|
497 | |||
498 | # global permissions |
|
498 | # global permissions | |
499 |
|
499 | |||
500 | config.add_route( |
|
500 | config.add_route( | |
501 | name='admin_permissions_application', |
|
501 | name='admin_permissions_application', | |
502 | pattern='/permissions/application') |
|
502 | pattern='/permissions/application') | |
503 | config.add_view( |
|
503 | config.add_view( | |
504 | AdminPermissionsView, |
|
504 | AdminPermissionsView, | |
505 | attr='permissions_application', |
|
505 | attr='permissions_application', | |
506 | route_name='admin_permissions_application', request_method='GET', |
|
506 | route_name='admin_permissions_application', request_method='GET', | |
507 | renderer='rhodecode:templates/admin/permissions/permissions.mako') |
|
507 | renderer='rhodecode:templates/admin/permissions/permissions.mako') | |
508 |
|
508 | |||
509 | config.add_route( |
|
509 | config.add_route( | |
510 | name='admin_permissions_application_update', |
|
510 | name='admin_permissions_application_update', | |
511 | pattern='/permissions/application/update') |
|
511 | pattern='/permissions/application/update') | |
512 | config.add_view( |
|
512 | config.add_view( | |
513 | AdminPermissionsView, |
|
513 | AdminPermissionsView, | |
514 | attr='permissions_application_update', |
|
514 | attr='permissions_application_update', | |
515 | route_name='admin_permissions_application_update', request_method='POST', |
|
515 | route_name='admin_permissions_application_update', request_method='POST', | |
516 | renderer='rhodecode:templates/admin/permissions/permissions.mako') |
|
516 | renderer='rhodecode:templates/admin/permissions/permissions.mako') | |
517 |
|
517 | |||
518 | config.add_route( |
|
518 | config.add_route( | |
519 | name='admin_permissions_global', |
|
519 | name='admin_permissions_global', | |
520 | pattern='/permissions/global') |
|
520 | pattern='/permissions/global') | |
521 | config.add_view( |
|
521 | config.add_view( | |
522 | AdminPermissionsView, |
|
522 | AdminPermissionsView, | |
523 | attr='permissions_global', |
|
523 | attr='permissions_global', | |
524 | route_name='admin_permissions_global', request_method='GET', |
|
524 | route_name='admin_permissions_global', request_method='GET', | |
525 | renderer='rhodecode:templates/admin/permissions/permissions.mako') |
|
525 | renderer='rhodecode:templates/admin/permissions/permissions.mako') | |
526 |
|
526 | |||
527 | config.add_route( |
|
527 | config.add_route( | |
528 | name='admin_permissions_global_update', |
|
528 | name='admin_permissions_global_update', | |
529 | pattern='/permissions/global/update') |
|
529 | pattern='/permissions/global/update') | |
530 | config.add_view( |
|
530 | config.add_view( | |
531 | AdminPermissionsView, |
|
531 | AdminPermissionsView, | |
532 | attr='permissions_global_update', |
|
532 | attr='permissions_global_update', | |
533 | route_name='admin_permissions_global_update', request_method='POST', |
|
533 | route_name='admin_permissions_global_update', request_method='POST', | |
534 | renderer='rhodecode:templates/admin/permissions/permissions.mako') |
|
534 | renderer='rhodecode:templates/admin/permissions/permissions.mako') | |
535 |
|
535 | |||
536 | config.add_route( |
|
536 | config.add_route( | |
537 | name='admin_permissions_object', |
|
537 | name='admin_permissions_object', | |
538 | pattern='/permissions/object') |
|
538 | pattern='/permissions/object') | |
539 | config.add_view( |
|
539 | config.add_view( | |
540 | AdminPermissionsView, |
|
540 | AdminPermissionsView, | |
541 | attr='permissions_objects', |
|
541 | attr='permissions_objects', | |
542 | route_name='admin_permissions_object', request_method='GET', |
|
542 | route_name='admin_permissions_object', request_method='GET', | |
543 | renderer='rhodecode:templates/admin/permissions/permissions.mako') |
|
543 | renderer='rhodecode:templates/admin/permissions/permissions.mako') | |
544 |
|
544 | |||
545 | config.add_route( |
|
545 | config.add_route( | |
546 | name='admin_permissions_object_update', |
|
546 | name='admin_permissions_object_update', | |
547 | pattern='/permissions/object/update') |
|
547 | pattern='/permissions/object/update') | |
548 | config.add_view( |
|
548 | config.add_view( | |
549 | AdminPermissionsView, |
|
549 | AdminPermissionsView, | |
550 | attr='permissions_objects_update', |
|
550 | attr='permissions_objects_update', | |
551 | route_name='admin_permissions_object_update', request_method='POST', |
|
551 | route_name='admin_permissions_object_update', request_method='POST', | |
552 | renderer='rhodecode:templates/admin/permissions/permissions.mako') |
|
552 | renderer='rhodecode:templates/admin/permissions/permissions.mako') | |
553 |
|
553 | |||
554 | # Branch perms EE feature |
|
554 | # Branch perms EE feature | |
555 | config.add_route( |
|
555 | config.add_route( | |
556 | name='admin_permissions_branch', |
|
556 | name='admin_permissions_branch', | |
557 | pattern='/permissions/branch') |
|
557 | pattern='/permissions/branch') | |
558 | config.add_view( |
|
558 | config.add_view( | |
559 | AdminPermissionsView, |
|
559 | AdminPermissionsView, | |
560 | attr='permissions_branch', |
|
560 | attr='permissions_branch', | |
561 | route_name='admin_permissions_branch', request_method='GET', |
|
561 | route_name='admin_permissions_branch', request_method='GET', | |
562 | renderer='rhodecode:templates/admin/permissions/permissions.mako') |
|
562 | renderer='rhodecode:templates/admin/permissions/permissions.mako') | |
563 |
|
563 | |||
564 | config.add_route( |
|
564 | config.add_route( | |
565 | name='admin_permissions_ips', |
|
565 | name='admin_permissions_ips', | |
566 | pattern='/permissions/ips') |
|
566 | pattern='/permissions/ips') | |
567 | config.add_view( |
|
567 | config.add_view( | |
568 | AdminPermissionsView, |
|
568 | AdminPermissionsView, | |
569 | attr='permissions_ips', |
|
569 | attr='permissions_ips', | |
570 | route_name='admin_permissions_ips', request_method='GET', |
|
570 | route_name='admin_permissions_ips', request_method='GET', | |
571 | renderer='rhodecode:templates/admin/permissions/permissions.mako') |
|
571 | renderer='rhodecode:templates/admin/permissions/permissions.mako') | |
572 |
|
572 | |||
573 | config.add_route( |
|
573 | config.add_route( | |
574 | name='admin_permissions_overview', |
|
574 | name='admin_permissions_overview', | |
575 | pattern='/permissions/overview') |
|
575 | pattern='/permissions/overview') | |
576 | config.add_view( |
|
576 | config.add_view( | |
577 | AdminPermissionsView, |
|
577 | AdminPermissionsView, | |
578 | attr='permissions_overview', |
|
578 | attr='permissions_overview', | |
579 | route_name='admin_permissions_overview', request_method='GET', |
|
579 | route_name='admin_permissions_overview', request_method='GET', | |
580 | renderer='rhodecode:templates/admin/permissions/permissions.mako') |
|
580 | renderer='rhodecode:templates/admin/permissions/permissions.mako') | |
581 |
|
581 | |||
582 | config.add_route( |
|
582 | config.add_route( | |
583 | name='admin_permissions_auth_token_access', |
|
583 | name='admin_permissions_auth_token_access', | |
584 | pattern='/permissions/auth_token_access') |
|
584 | pattern='/permissions/auth_token_access') | |
585 | config.add_view( |
|
585 | config.add_view( | |
586 | AdminPermissionsView, |
|
586 | AdminPermissionsView, | |
587 | attr='auth_token_access', |
|
587 | attr='auth_token_access', | |
588 | route_name='admin_permissions_auth_token_access', request_method='GET', |
|
588 | route_name='admin_permissions_auth_token_access', request_method='GET', | |
589 | renderer='rhodecode:templates/admin/permissions/permissions.mako') |
|
589 | renderer='rhodecode:templates/admin/permissions/permissions.mako') | |
590 |
|
590 | |||
591 | config.add_route( |
|
591 | config.add_route( | |
592 | name='admin_permissions_ssh_keys', |
|
592 | name='admin_permissions_ssh_keys', | |
593 | pattern='/permissions/ssh_keys') |
|
593 | pattern='/permissions/ssh_keys') | |
594 | config.add_view( |
|
594 | config.add_view( | |
595 | AdminPermissionsView, |
|
595 | AdminPermissionsView, | |
596 | attr='ssh_keys', |
|
596 | attr='ssh_keys', | |
597 | route_name='admin_permissions_ssh_keys', request_method='GET', |
|
597 | route_name='admin_permissions_ssh_keys', request_method='GET', | |
598 | renderer='rhodecode:templates/admin/permissions/permissions.mako') |
|
598 | renderer='rhodecode:templates/admin/permissions/permissions.mako') | |
599 |
|
599 | |||
600 | config.add_route( |
|
600 | config.add_route( | |
601 | name='admin_permissions_ssh_keys_data', |
|
601 | name='admin_permissions_ssh_keys_data', | |
602 | pattern='/permissions/ssh_keys/data') |
|
602 | pattern='/permissions/ssh_keys/data') | |
603 | config.add_view( |
|
603 | config.add_view( | |
604 | AdminPermissionsView, |
|
604 | AdminPermissionsView, | |
605 | attr='ssh_keys_data', |
|
605 | attr='ssh_keys_data', | |
606 | route_name='admin_permissions_ssh_keys_data', request_method='GET', |
|
606 | route_name='admin_permissions_ssh_keys_data', request_method='GET', | |
607 | renderer='json_ext', xhr=True) |
|
607 | renderer='json_ext', xhr=True) | |
608 |
|
608 | |||
609 | config.add_route( |
|
609 | config.add_route( | |
610 | name='admin_permissions_ssh_keys_update', |
|
610 | name='admin_permissions_ssh_keys_update', | |
611 | pattern='/permissions/ssh_keys/update') |
|
611 | pattern='/permissions/ssh_keys/update') | |
612 | config.add_view( |
|
612 | config.add_view( | |
613 | AdminPermissionsView, |
|
613 | AdminPermissionsView, | |
614 | attr='ssh_keys_update', |
|
614 | attr='ssh_keys_update', | |
615 | route_name='admin_permissions_ssh_keys_update', request_method='POST', |
|
615 | route_name='admin_permissions_ssh_keys_update', request_method='POST', | |
616 | renderer='rhodecode:templates/admin/permissions/permissions.mako') |
|
616 | renderer='rhodecode:templates/admin/permissions/permissions.mako') | |
617 |
|
617 | |||
618 | # users admin |
|
618 | # users admin | |
619 | config.add_route( |
|
619 | config.add_route( | |
620 | name='users', |
|
620 | name='users', | |
621 | pattern='/users') |
|
621 | pattern='/users') | |
622 | config.add_view( |
|
622 | config.add_view( | |
623 | AdminUsersView, |
|
623 | AdminUsersView, | |
624 | attr='users_list', |
|
624 | attr='users_list', | |
625 | route_name='users', request_method='GET', |
|
625 | route_name='users', request_method='GET', | |
626 | renderer='rhodecode:templates/admin/users/users.mako') |
|
626 | renderer='rhodecode:templates/admin/users/users.mako') | |
627 |
|
627 | |||
628 | config.add_route( |
|
628 | config.add_route( | |
629 | name='users_data', |
|
629 | name='users_data', | |
630 | pattern='/users_data') |
|
630 | pattern='/users_data') | |
631 | config.add_view( |
|
631 | config.add_view( | |
632 | AdminUsersView, |
|
632 | AdminUsersView, | |
633 | attr='users_list_data', |
|
633 | attr='users_list_data', | |
634 | # renderer defined below |
|
634 | # renderer defined below | |
635 | route_name='users_data', request_method='GET', |
|
635 | route_name='users_data', request_method='GET', | |
636 | renderer='json_ext', xhr=True) |
|
636 | renderer='json_ext', xhr=True) | |
637 |
|
637 | |||
638 | config.add_route( |
|
638 | config.add_route( | |
639 | name='users_create', |
|
639 | name='users_create', | |
640 | pattern='/users/create') |
|
640 | pattern='/users/create') | |
641 | config.add_view( |
|
641 | config.add_view( | |
642 | AdminUsersView, |
|
642 | AdminUsersView, | |
643 | attr='users_create', |
|
643 | attr='users_create', | |
644 | route_name='users_create', request_method='POST', |
|
644 | route_name='users_create', request_method='POST', | |
645 | renderer='rhodecode:templates/admin/users/user_add.mako') |
|
645 | renderer='rhodecode:templates/admin/users/user_add.mako') | |
646 |
|
646 | |||
647 | config.add_route( |
|
647 | config.add_route( | |
648 | name='users_new', |
|
648 | name='users_new', | |
649 | pattern='/users/new') |
|
649 | pattern='/users/new') | |
650 | config.add_view( |
|
650 | config.add_view( | |
651 | AdminUsersView, |
|
651 | AdminUsersView, | |
652 | attr='users_new', |
|
652 | attr='users_new', | |
653 | route_name='users_new', request_method='GET', |
|
653 | route_name='users_new', request_method='GET', | |
654 | renderer='rhodecode:templates/admin/users/user_add.mako') |
|
654 | renderer='rhodecode:templates/admin/users/user_add.mako') | |
655 |
|
655 | |||
656 | # user management |
|
656 | # user management | |
657 | config.add_route( |
|
657 | config.add_route( | |
658 | name='user_edit', |
|
658 | name='user_edit', | |
659 | pattern=r'/users/{user_id:\d+}/edit', |
|
659 | pattern=r'/users/{user_id:\d+}/edit', | |
660 | user_route=True) |
|
660 | user_route=True) | |
661 | config.add_view( |
|
661 | config.add_view( | |
662 | UsersView, |
|
662 | UsersView, | |
663 | attr='user_edit', |
|
663 | attr='user_edit', | |
664 | route_name='user_edit', request_method='GET', |
|
664 | route_name='user_edit', request_method='GET', | |
665 | renderer='rhodecode:templates/admin/users/user_edit.mako') |
|
665 | renderer='rhodecode:templates/admin/users/user_edit.mako') | |
666 |
|
666 | |||
667 | config.add_route( |
|
667 | config.add_route( | |
668 | name='user_edit_advanced', |
|
668 | name='user_edit_advanced', | |
669 | pattern=r'/users/{user_id:\d+}/edit/advanced', |
|
669 | pattern=r'/users/{user_id:\d+}/edit/advanced', | |
670 | user_route=True) |
|
670 | user_route=True) | |
671 | config.add_view( |
|
671 | config.add_view( | |
672 | UsersView, |
|
672 | UsersView, | |
673 | attr='user_edit_advanced', |
|
673 | attr='user_edit_advanced', | |
674 | route_name='user_edit_advanced', request_method='GET', |
|
674 | route_name='user_edit_advanced', request_method='GET', | |
675 | renderer='rhodecode:templates/admin/users/user_edit.mako') |
|
675 | renderer='rhodecode:templates/admin/users/user_edit.mako') | |
676 |
|
676 | |||
677 | config.add_route( |
|
677 | config.add_route( | |
678 | name='user_edit_global_perms', |
|
678 | name='user_edit_global_perms', | |
679 | pattern=r'/users/{user_id:\d+}/edit/global_permissions', |
|
679 | pattern=r'/users/{user_id:\d+}/edit/global_permissions', | |
680 | user_route=True) |
|
680 | user_route=True) | |
681 | config.add_view( |
|
681 | config.add_view( | |
682 | UsersView, |
|
682 | UsersView, | |
683 | attr='user_edit_global_perms', |
|
683 | attr='user_edit_global_perms', | |
684 | route_name='user_edit_global_perms', request_method='GET', |
|
684 | route_name='user_edit_global_perms', request_method='GET', | |
685 | renderer='rhodecode:templates/admin/users/user_edit.mako') |
|
685 | renderer='rhodecode:templates/admin/users/user_edit.mako') | |
686 |
|
686 | |||
687 | config.add_route( |
|
687 | config.add_route( | |
688 | name='user_edit_global_perms_update', |
|
688 | name='user_edit_global_perms_update', | |
689 | pattern=r'/users/{user_id:\d+}/edit/global_permissions/update', |
|
689 | pattern=r'/users/{user_id:\d+}/edit/global_permissions/update', | |
690 | user_route=True) |
|
690 | user_route=True) | |
691 | config.add_view( |
|
691 | config.add_view( | |
692 | UsersView, |
|
692 | UsersView, | |
693 | attr='user_edit_global_perms_update', |
|
693 | attr='user_edit_global_perms_update', | |
694 | route_name='user_edit_global_perms_update', request_method='POST', |
|
694 | route_name='user_edit_global_perms_update', request_method='POST', | |
695 | renderer='rhodecode:templates/admin/users/user_edit.mako') |
|
695 | renderer='rhodecode:templates/admin/users/user_edit.mako') | |
696 |
|
696 | |||
697 | config.add_route( |
|
697 | config.add_route( | |
698 | name='user_update', |
|
698 | name='user_update', | |
699 | pattern=r'/users/{user_id:\d+}/update', |
|
699 | pattern=r'/users/{user_id:\d+}/update', | |
700 | user_route=True) |
|
700 | user_route=True) | |
701 | config.add_view( |
|
701 | config.add_view( | |
702 | UsersView, |
|
702 | UsersView, | |
703 | attr='user_update', |
|
703 | attr='user_update', | |
704 | route_name='user_update', request_method='POST', |
|
704 | route_name='user_update', request_method='POST', | |
705 | renderer='rhodecode:templates/admin/users/user_edit.mako') |
|
705 | renderer='rhodecode:templates/admin/users/user_edit.mako') | |
706 |
|
706 | |||
707 | config.add_route( |
|
707 | config.add_route( | |
708 | name='user_delete', |
|
708 | name='user_delete', | |
709 | pattern=r'/users/{user_id:\d+}/delete', |
|
709 | pattern=r'/users/{user_id:\d+}/delete', | |
710 | user_route=True) |
|
710 | user_route=True) | |
711 | config.add_view( |
|
711 | config.add_view( | |
712 | UsersView, |
|
712 | UsersView, | |
713 | attr='user_delete', |
|
713 | attr='user_delete', | |
714 | route_name='user_delete', request_method='POST', |
|
714 | route_name='user_delete', request_method='POST', | |
715 | renderer='rhodecode:templates/admin/users/user_edit.mako') |
|
715 | renderer='rhodecode:templates/admin/users/user_edit.mako') | |
716 |
|
716 | |||
717 | config.add_route( |
|
717 | config.add_route( | |
718 | name='user_enable_force_password_reset', |
|
718 | name='user_enable_force_password_reset', | |
719 | pattern=r'/users/{user_id:\d+}/password_reset_enable', |
|
719 | pattern=r'/users/{user_id:\d+}/password_reset_enable', | |
720 | user_route=True) |
|
720 | user_route=True) | |
721 | config.add_view( |
|
721 | config.add_view( | |
722 | UsersView, |
|
722 | UsersView, | |
723 | attr='user_enable_force_password_reset', |
|
723 | attr='user_enable_force_password_reset', | |
724 | route_name='user_enable_force_password_reset', request_method='POST', |
|
724 | route_name='user_enable_force_password_reset', request_method='POST', | |
725 | renderer='rhodecode:templates/admin/users/user_edit.mako') |
|
725 | renderer='rhodecode:templates/admin/users/user_edit.mako') | |
726 |
|
726 | |||
727 | config.add_route( |
|
727 | config.add_route( | |
728 | name='user_disable_force_password_reset', |
|
728 | name='user_disable_force_password_reset', | |
729 | pattern=r'/users/{user_id:\d+}/password_reset_disable', |
|
729 | pattern=r'/users/{user_id:\d+}/password_reset_disable', | |
730 | user_route=True) |
|
730 | user_route=True) | |
731 | config.add_view( |
|
731 | config.add_view( | |
732 | UsersView, |
|
732 | UsersView, | |
733 | attr='user_disable_force_password_reset', |
|
733 | attr='user_disable_force_password_reset', | |
734 | route_name='user_disable_force_password_reset', request_method='POST', |
|
734 | route_name='user_disable_force_password_reset', request_method='POST', | |
735 | renderer='rhodecode:templates/admin/users/user_edit.mako') |
|
735 | renderer='rhodecode:templates/admin/users/user_edit.mako') | |
736 |
|
736 | |||
737 | config.add_route( |
|
737 | config.add_route( | |
738 | name='user_create_personal_repo_group', |
|
738 | name='user_create_personal_repo_group', | |
739 | pattern=r'/users/{user_id:\d+}/create_repo_group', |
|
739 | pattern=r'/users/{user_id:\d+}/create_repo_group', | |
740 | user_route=True) |
|
740 | user_route=True) | |
741 | config.add_view( |
|
741 | config.add_view( | |
742 | UsersView, |
|
742 | UsersView, | |
743 | attr='user_create_personal_repo_group', |
|
743 | attr='user_create_personal_repo_group', | |
744 | route_name='user_create_personal_repo_group', request_method='POST', |
|
744 | route_name='user_create_personal_repo_group', request_method='POST', | |
745 | renderer='rhodecode:templates/admin/users/user_edit.mako') |
|
745 | renderer='rhodecode:templates/admin/users/user_edit.mako') | |
746 |
|
746 | |||
747 | # user notice |
|
747 | # user notice | |
748 | config.add_route( |
|
748 | config.add_route( | |
749 | name='user_notice_dismiss', |
|
749 | name='user_notice_dismiss', | |
750 | pattern=r'/users/{user_id:\d+}/notice_dismiss', |
|
750 | pattern=r'/users/{user_id:\d+}/notice_dismiss', | |
751 | user_route=True) |
|
751 | user_route=True) | |
752 | config.add_view( |
|
752 | config.add_view( | |
753 | UsersView, |
|
753 | UsersView, | |
754 | attr='user_notice_dismiss', |
|
754 | attr='user_notice_dismiss', | |
755 | route_name='user_notice_dismiss', request_method='POST', |
|
755 | route_name='user_notice_dismiss', request_method='POST', | |
756 | renderer='json_ext', xhr=True) |
|
756 | renderer='json_ext', xhr=True) | |
757 |
|
757 | |||
758 | # user auth tokens |
|
758 | # user auth tokens | |
759 | config.add_route( |
|
759 | config.add_route( | |
760 | name='edit_user_auth_tokens', |
|
760 | name='edit_user_auth_tokens', | |
761 | pattern=r'/users/{user_id:\d+}/edit/auth_tokens', |
|
761 | pattern=r'/users/{user_id:\d+}/edit/auth_tokens', | |
762 | user_route=True) |
|
762 | user_route=True) | |
763 | config.add_view( |
|
763 | config.add_view( | |
764 | UsersView, |
|
764 | UsersView, | |
765 | attr='auth_tokens', |
|
765 | attr='auth_tokens', | |
766 | route_name='edit_user_auth_tokens', request_method='GET', |
|
766 | route_name='edit_user_auth_tokens', request_method='GET', | |
767 | renderer='rhodecode:templates/admin/users/user_edit.mako') |
|
767 | renderer='rhodecode:templates/admin/users/user_edit.mako') | |
768 |
|
768 | |||
769 | config.add_route( |
|
769 | config.add_route( | |
770 | name='edit_user_auth_tokens_view', |
|
770 | name='edit_user_auth_tokens_view', | |
771 | pattern=r'/users/{user_id:\d+}/edit/auth_tokens/view', |
|
771 | pattern=r'/users/{user_id:\d+}/edit/auth_tokens/view', | |
772 | user_route=True) |
|
772 | user_route=True) | |
773 | config.add_view( |
|
773 | config.add_view( | |
774 | UsersView, |
|
774 | UsersView, | |
775 | attr='auth_tokens_view', |
|
775 | attr='auth_tokens_view', | |
776 | route_name='edit_user_auth_tokens_view', request_method='POST', |
|
776 | route_name='edit_user_auth_tokens_view', request_method='POST', | |
777 | renderer='json_ext', xhr=True) |
|
777 | renderer='json_ext', xhr=True) | |
778 |
|
778 | |||
779 | config.add_route( |
|
779 | config.add_route( | |
780 | name='edit_user_auth_tokens_add', |
|
780 | name='edit_user_auth_tokens_add', | |
781 | pattern=r'/users/{user_id:\d+}/edit/auth_tokens/new', |
|
781 | pattern=r'/users/{user_id:\d+}/edit/auth_tokens/new', | |
782 | user_route=True) |
|
782 | user_route=True) | |
783 | config.add_view( |
|
783 | config.add_view( | |
784 | UsersView, |
|
784 | UsersView, | |
785 | attr='auth_tokens_add', |
|
785 | attr='auth_tokens_add', | |
786 | route_name='edit_user_auth_tokens_add', request_method='POST') |
|
786 | route_name='edit_user_auth_tokens_add', request_method='POST') | |
787 |
|
787 | |||
788 | config.add_route( |
|
788 | config.add_route( | |
789 | name='edit_user_auth_tokens_delete', |
|
789 | name='edit_user_auth_tokens_delete', | |
790 | pattern=r'/users/{user_id:\d+}/edit/auth_tokens/delete', |
|
790 | pattern=r'/users/{user_id:\d+}/edit/auth_tokens/delete', | |
791 | user_route=True) |
|
791 | user_route=True) | |
792 | config.add_view( |
|
792 | config.add_view( | |
793 | UsersView, |
|
793 | UsersView, | |
794 | attr='auth_tokens_delete', |
|
794 | attr='auth_tokens_delete', | |
795 | route_name='edit_user_auth_tokens_delete', request_method='POST') |
|
795 | route_name='edit_user_auth_tokens_delete', request_method='POST') | |
796 |
|
796 | |||
797 | # user ssh keys |
|
797 | # user ssh keys | |
798 | config.add_route( |
|
798 | config.add_route( | |
799 | name='edit_user_ssh_keys', |
|
799 | name='edit_user_ssh_keys', | |
800 | pattern=r'/users/{user_id:\d+}/edit/ssh_keys', |
|
800 | pattern=r'/users/{user_id:\d+}/edit/ssh_keys', | |
801 | user_route=True) |
|
801 | user_route=True) | |
802 | config.add_view( |
|
802 | config.add_view( | |
803 | UsersView, |
|
803 | UsersView, | |
804 | attr='ssh_keys', |
|
804 | attr='ssh_keys', | |
805 | route_name='edit_user_ssh_keys', request_method='GET', |
|
805 | route_name='edit_user_ssh_keys', request_method='GET', | |
806 | renderer='rhodecode:templates/admin/users/user_edit.mako') |
|
806 | renderer='rhodecode:templates/admin/users/user_edit.mako') | |
807 |
|
807 | |||
808 | config.add_route( |
|
808 | config.add_route( | |
809 | name='edit_user_ssh_keys_generate_keypair', |
|
809 | name='edit_user_ssh_keys_generate_keypair', | |
810 | pattern=r'/users/{user_id:\d+}/edit/ssh_keys/generate', |
|
810 | pattern=r'/users/{user_id:\d+}/edit/ssh_keys/generate', | |
811 | user_route=True) |
|
811 | user_route=True) | |
812 | config.add_view( |
|
812 | config.add_view( | |
813 | UsersView, |
|
813 | UsersView, | |
814 | attr='ssh_keys_generate_keypair', |
|
814 | attr='ssh_keys_generate_keypair', | |
815 | route_name='edit_user_ssh_keys_generate_keypair', request_method='GET', |
|
815 | route_name='edit_user_ssh_keys_generate_keypair', request_method='GET', | |
816 | renderer='rhodecode:templates/admin/users/user_edit.mako') |
|
816 | renderer='rhodecode:templates/admin/users/user_edit.mako') | |
817 |
|
817 | |||
818 | config.add_route( |
|
818 | config.add_route( | |
819 | name='edit_user_ssh_keys_add', |
|
819 | name='edit_user_ssh_keys_add', | |
820 | pattern=r'/users/{user_id:\d+}/edit/ssh_keys/new', |
|
820 | pattern=r'/users/{user_id:\d+}/edit/ssh_keys/new', | |
821 | user_route=True) |
|
821 | user_route=True) | |
822 | config.add_view( |
|
822 | config.add_view( | |
823 | UsersView, |
|
823 | UsersView, | |
824 | attr='ssh_keys_add', |
|
824 | attr='ssh_keys_add', | |
825 | route_name='edit_user_ssh_keys_add', request_method='POST') |
|
825 | route_name='edit_user_ssh_keys_add', request_method='POST') | |
826 |
|
826 | |||
827 | config.add_route( |
|
827 | config.add_route( | |
828 | name='edit_user_ssh_keys_delete', |
|
828 | name='edit_user_ssh_keys_delete', | |
829 | pattern=r'/users/{user_id:\d+}/edit/ssh_keys/delete', |
|
829 | pattern=r'/users/{user_id:\d+}/edit/ssh_keys/delete', | |
830 | user_route=True) |
|
830 | user_route=True) | |
831 | config.add_view( |
|
831 | config.add_view( | |
832 | UsersView, |
|
832 | UsersView, | |
833 | attr='ssh_keys_delete', |
|
833 | attr='ssh_keys_delete', | |
834 | route_name='edit_user_ssh_keys_delete', request_method='POST') |
|
834 | route_name='edit_user_ssh_keys_delete', request_method='POST') | |
835 |
|
835 | |||
836 | # user emails |
|
836 | # user emails | |
837 | config.add_route( |
|
837 | config.add_route( | |
838 | name='edit_user_emails', |
|
838 | name='edit_user_emails', | |
839 | pattern=r'/users/{user_id:\d+}/edit/emails', |
|
839 | pattern=r'/users/{user_id:\d+}/edit/emails', | |
840 | user_route=True) |
|
840 | user_route=True) | |
841 | config.add_view( |
|
841 | config.add_view( | |
842 | UsersView, |
|
842 | UsersView, | |
843 | attr='emails', |
|
843 | attr='emails', | |
844 | route_name='edit_user_emails', request_method='GET', |
|
844 | route_name='edit_user_emails', request_method='GET', | |
845 | renderer='rhodecode:templates/admin/users/user_edit.mako') |
|
845 | renderer='rhodecode:templates/admin/users/user_edit.mako') | |
846 |
|
846 | |||
847 | config.add_route( |
|
847 | config.add_route( | |
848 | name='edit_user_emails_add', |
|
848 | name='edit_user_emails_add', | |
849 | pattern=r'/users/{user_id:\d+}/edit/emails/new', |
|
849 | pattern=r'/users/{user_id:\d+}/edit/emails/new', | |
850 | user_route=True) |
|
850 | user_route=True) | |
851 | config.add_view( |
|
851 | config.add_view( | |
852 | UsersView, |
|
852 | UsersView, | |
853 | attr='emails_add', |
|
853 | attr='emails_add', | |
854 | route_name='edit_user_emails_add', request_method='POST') |
|
854 | route_name='edit_user_emails_add', request_method='POST') | |
855 |
|
855 | |||
856 | config.add_route( |
|
856 | config.add_route( | |
857 | name='edit_user_emails_delete', |
|
857 | name='edit_user_emails_delete', | |
858 | pattern=r'/users/{user_id:\d+}/edit/emails/delete', |
|
858 | pattern=r'/users/{user_id:\d+}/edit/emails/delete', | |
859 | user_route=True) |
|
859 | user_route=True) | |
860 | config.add_view( |
|
860 | config.add_view( | |
861 | UsersView, |
|
861 | UsersView, | |
862 | attr='emails_delete', |
|
862 | attr='emails_delete', | |
863 | route_name='edit_user_emails_delete', request_method='POST') |
|
863 | route_name='edit_user_emails_delete', request_method='POST') | |
864 |
|
864 | |||
865 | # user IPs |
|
865 | # user IPs | |
866 | config.add_route( |
|
866 | config.add_route( | |
867 | name='edit_user_ips', |
|
867 | name='edit_user_ips', | |
868 | pattern=r'/users/{user_id:\d+}/edit/ips', |
|
868 | pattern=r'/users/{user_id:\d+}/edit/ips', | |
869 | user_route=True) |
|
869 | user_route=True) | |
870 | config.add_view( |
|
870 | config.add_view( | |
871 | UsersView, |
|
871 | UsersView, | |
872 | attr='ips', |
|
872 | attr='ips', | |
873 | route_name='edit_user_ips', request_method='GET', |
|
873 | route_name='edit_user_ips', request_method='GET', | |
874 | renderer='rhodecode:templates/admin/users/user_edit.mako') |
|
874 | renderer='rhodecode:templates/admin/users/user_edit.mako') | |
875 |
|
875 | |||
876 | config.add_route( |
|
876 | config.add_route( | |
877 | name='edit_user_ips_add', |
|
877 | name='edit_user_ips_add', | |
878 | pattern=r'/users/{user_id:\d+}/edit/ips/new', |
|
878 | pattern=r'/users/{user_id:\d+}/edit/ips/new', | |
879 | user_route_with_default=True) # enabled for default user too |
|
879 | user_route_with_default=True) # enabled for default user too | |
880 | config.add_view( |
|
880 | config.add_view( | |
881 | UsersView, |
|
881 | UsersView, | |
882 | attr='ips_add', |
|
882 | attr='ips_add', | |
883 | route_name='edit_user_ips_add', request_method='POST') |
|
883 | route_name='edit_user_ips_add', request_method='POST') | |
884 |
|
884 | |||
885 | config.add_route( |
|
885 | config.add_route( | |
886 | name='edit_user_ips_delete', |
|
886 | name='edit_user_ips_delete', | |
887 | pattern=r'/users/{user_id:\d+}/edit/ips/delete', |
|
887 | pattern=r'/users/{user_id:\d+}/edit/ips/delete', | |
888 | user_route_with_default=True) # enabled for default user too |
|
888 | user_route_with_default=True) # enabled for default user too | |
889 | config.add_view( |
|
889 | config.add_view( | |
890 | UsersView, |
|
890 | UsersView, | |
891 | attr='ips_delete', |
|
891 | attr='ips_delete', | |
892 | route_name='edit_user_ips_delete', request_method='POST') |
|
892 | route_name='edit_user_ips_delete', request_method='POST') | |
893 |
|
893 | |||
894 | # user perms |
|
894 | # user perms | |
895 | config.add_route( |
|
895 | config.add_route( | |
896 | name='edit_user_perms_summary', |
|
896 | name='edit_user_perms_summary', | |
897 | pattern=r'/users/{user_id:\d+}/edit/permissions_summary', |
|
897 | pattern=r'/users/{user_id:\d+}/edit/permissions_summary', | |
898 | user_route=True) |
|
898 | user_route=True) | |
899 | config.add_view( |
|
899 | config.add_view( | |
900 | UsersView, |
|
900 | UsersView, | |
901 | attr='user_perms_summary', |
|
901 | attr='user_perms_summary', | |
902 | route_name='edit_user_perms_summary', request_method='GET', |
|
902 | route_name='edit_user_perms_summary', request_method='GET', | |
903 | renderer='rhodecode:templates/admin/users/user_edit.mako') |
|
903 | renderer='rhodecode:templates/admin/users/user_edit.mako') | |
904 |
|
904 | |||
905 | config.add_route( |
|
905 | config.add_route( | |
906 | name='edit_user_perms_summary_json', |
|
906 | name='edit_user_perms_summary_json', | |
907 | pattern=r'/users/{user_id:\d+}/edit/permissions_summary/json', |
|
907 | pattern=r'/users/{user_id:\d+}/edit/permissions_summary/json', | |
908 | user_route=True) |
|
908 | user_route=True) | |
909 | config.add_view( |
|
909 | config.add_view( | |
910 | UsersView, |
|
910 | UsersView, | |
911 | attr='user_perms_summary_json', |
|
911 | attr='user_perms_summary_json', | |
912 | route_name='edit_user_perms_summary_json', request_method='GET', |
|
912 | route_name='edit_user_perms_summary_json', request_method='GET', | |
913 | renderer='json_ext') |
|
913 | renderer='json_ext') | |
914 |
|
914 | |||
915 | # user user groups management |
|
915 | # user user groups management | |
916 | config.add_route( |
|
916 | config.add_route( | |
917 | name='edit_user_groups_management', |
|
917 | name='edit_user_groups_management', | |
918 | pattern=r'/users/{user_id:\d+}/edit/groups_management', |
|
918 | pattern=r'/users/{user_id:\d+}/edit/groups_management', | |
919 | user_route=True) |
|
919 | user_route=True) | |
920 | config.add_view( |
|
920 | config.add_view( | |
921 | UsersView, |
|
921 | UsersView, | |
922 | attr='groups_management', |
|
922 | attr='groups_management', | |
923 | route_name='edit_user_groups_management', request_method='GET', |
|
923 | route_name='edit_user_groups_management', request_method='GET', | |
924 | renderer='rhodecode:templates/admin/users/user_edit.mako') |
|
924 | renderer='rhodecode:templates/admin/users/user_edit.mako') | |
925 |
|
925 | |||
926 | config.add_route( |
|
926 | config.add_route( | |
927 | name='edit_user_groups_management_updates', |
|
927 | name='edit_user_groups_management_updates', | |
928 | pattern=r'/users/{user_id:\d+}/edit/edit_user_groups_management/updates', |
|
928 | pattern=r'/users/{user_id:\d+}/edit/edit_user_groups_management/updates', | |
929 | user_route=True) |
|
929 | user_route=True) | |
930 | config.add_view( |
|
930 | config.add_view( | |
931 | UsersView, |
|
931 | UsersView, | |
932 | attr='groups_management_updates', |
|
932 | attr='groups_management_updates', | |
933 | route_name='edit_user_groups_management_updates', request_method='POST') |
|
933 | route_name='edit_user_groups_management_updates', request_method='POST') | |
934 |
|
934 | |||
935 | # user audit logs |
|
935 | # user audit logs | |
936 | config.add_route( |
|
936 | config.add_route( | |
937 | name='edit_user_audit_logs', |
|
937 | name='edit_user_audit_logs', | |
938 | pattern=r'/users/{user_id:\d+}/edit/audit', user_route=True) |
|
938 | pattern=r'/users/{user_id:\d+}/edit/audit', user_route=True) | |
939 | config.add_view( |
|
939 | config.add_view( | |
940 | UsersView, |
|
940 | UsersView, | |
941 | attr='user_audit_logs', |
|
941 | attr='user_audit_logs', | |
942 | route_name='edit_user_audit_logs', request_method='GET', |
|
942 | route_name='edit_user_audit_logs', request_method='GET', | |
943 | renderer='rhodecode:templates/admin/users/user_edit.mako') |
|
943 | renderer='rhodecode:templates/admin/users/user_edit.mako') | |
944 |
|
944 | |||
945 | config.add_route( |
|
945 | config.add_route( | |
946 | name='edit_user_audit_logs_download', |
|
946 | name='edit_user_audit_logs_download', | |
947 | pattern=r'/users/{user_id:\d+}/edit/audit/download', user_route=True) |
|
947 | pattern=r'/users/{user_id:\d+}/edit/audit/download', user_route=True) | |
948 | config.add_view( |
|
948 | config.add_view( | |
949 | UsersView, |
|
949 | UsersView, | |
950 | attr='user_audit_logs_download', |
|
950 | attr='user_audit_logs_download', | |
951 | route_name='edit_user_audit_logs_download', request_method='GET', |
|
951 | route_name='edit_user_audit_logs_download', request_method='GET', | |
952 | renderer='string') |
|
952 | renderer='string') | |
953 |
|
953 | |||
954 | # user caches |
|
954 | # user caches | |
955 | config.add_route( |
|
955 | config.add_route( | |
956 | name='edit_user_caches', |
|
956 | name='edit_user_caches', | |
957 | pattern=r'/users/{user_id:\d+}/edit/caches', |
|
957 | pattern=r'/users/{user_id:\d+}/edit/caches', | |
958 | user_route=True) |
|
958 | user_route=True) | |
959 | config.add_view( |
|
959 | config.add_view( | |
960 | UsersView, |
|
960 | UsersView, | |
961 | attr='user_caches', |
|
961 | attr='user_caches', | |
962 | route_name='edit_user_caches', request_method='GET', |
|
962 | route_name='edit_user_caches', request_method='GET', | |
963 | renderer='rhodecode:templates/admin/users/user_edit.mako') |
|
963 | renderer='rhodecode:templates/admin/users/user_edit.mako') | |
964 |
|
964 | |||
965 | config.add_route( |
|
965 | config.add_route( | |
966 | name='edit_user_caches_update', |
|
966 | name='edit_user_caches_update', | |
967 | pattern=r'/users/{user_id:\d+}/edit/caches/update', |
|
967 | pattern=r'/users/{user_id:\d+}/edit/caches/update', | |
968 | user_route=True) |
|
968 | user_route=True) | |
969 | config.add_view( |
|
969 | config.add_view( | |
970 | UsersView, |
|
970 | UsersView, | |
971 | attr='user_caches_update', |
|
971 | attr='user_caches_update', | |
972 | route_name='edit_user_caches_update', request_method='POST') |
|
972 | route_name='edit_user_caches_update', request_method='POST') | |
973 |
|
973 | |||
974 | # user-groups admin |
|
974 | # user-groups admin | |
975 | config.add_route( |
|
975 | config.add_route( | |
976 | name='user_groups', |
|
976 | name='user_groups', | |
977 | pattern='/user_groups') |
|
977 | pattern='/user_groups') | |
978 | config.add_view( |
|
978 | config.add_view( | |
979 | AdminUserGroupsView, |
|
979 | AdminUserGroupsView, | |
980 | attr='user_groups_list', |
|
980 | attr='user_groups_list', | |
981 | route_name='user_groups', request_method='GET', |
|
981 | route_name='user_groups', request_method='GET', | |
982 | renderer='rhodecode:templates/admin/user_groups/user_groups.mako') |
|
982 | renderer='rhodecode:templates/admin/user_groups/user_groups.mako') | |
983 |
|
983 | |||
984 | config.add_route( |
|
984 | config.add_route( | |
985 | name='user_groups_data', |
|
985 | name='user_groups_data', | |
986 | pattern='/user_groups_data') |
|
986 | pattern='/user_groups_data') | |
987 | config.add_view( |
|
987 | config.add_view( | |
988 | AdminUserGroupsView, |
|
988 | AdminUserGroupsView, | |
989 | attr='user_groups_list_data', |
|
989 | attr='user_groups_list_data', | |
990 | route_name='user_groups_data', request_method='GET', |
|
990 | route_name='user_groups_data', request_method='GET', | |
991 | renderer='json_ext', xhr=True) |
|
991 | renderer='json_ext', xhr=True) | |
992 |
|
992 | |||
993 | config.add_route( |
|
993 | config.add_route( | |
994 | name='user_groups_new', |
|
994 | name='user_groups_new', | |
995 | pattern='/user_groups/new') |
|
995 | pattern='/user_groups/new') | |
996 | config.add_view( |
|
996 | config.add_view( | |
997 | AdminUserGroupsView, |
|
997 | AdminUserGroupsView, | |
998 | attr='user_groups_new', |
|
998 | attr='user_groups_new', | |
999 | route_name='user_groups_new', request_method='GET', |
|
999 | route_name='user_groups_new', request_method='GET', | |
1000 | renderer='rhodecode:templates/admin/user_groups/user_group_add.mako') |
|
1000 | renderer='rhodecode:templates/admin/user_groups/user_group_add.mako') | |
1001 |
|
1001 | |||
1002 | config.add_route( |
|
1002 | config.add_route( | |
1003 | name='user_groups_create', |
|
1003 | name='user_groups_create', | |
1004 | pattern='/user_groups/create') |
|
1004 | pattern='/user_groups/create') | |
1005 | config.add_view( |
|
1005 | config.add_view( | |
1006 | AdminUserGroupsView, |
|
1006 | AdminUserGroupsView, | |
1007 | attr='user_groups_create', |
|
1007 | attr='user_groups_create', | |
1008 | route_name='user_groups_create', request_method='POST', |
|
1008 | route_name='user_groups_create', request_method='POST', | |
1009 | renderer='rhodecode:templates/admin/user_groups/user_group_add.mako') |
|
1009 | renderer='rhodecode:templates/admin/user_groups/user_group_add.mako') | |
1010 |
|
1010 | |||
1011 | # repos admin |
|
1011 | # repos admin | |
1012 | config.add_route( |
|
1012 | config.add_route( | |
1013 | name='repos', |
|
1013 | name='repos', | |
1014 | pattern='/repos') |
|
1014 | pattern='/repos') | |
1015 | config.add_view( |
|
1015 | config.add_view( | |
1016 | AdminReposView, |
|
1016 | AdminReposView, | |
1017 | attr='repository_list', |
|
1017 | attr='repository_list', | |
1018 | route_name='repos', request_method='GET', |
|
1018 | route_name='repos', request_method='GET', | |
1019 | renderer='rhodecode:templates/admin/repos/repos.mako') |
|
1019 | renderer='rhodecode:templates/admin/repos/repos.mako') | |
1020 |
|
1020 | |||
1021 | config.add_route( |
|
1021 | config.add_route( | |
1022 | name='repos_data', |
|
1022 | name='repos_data', | |
1023 | pattern='/repos_data') |
|
1023 | pattern='/repos_data') | |
1024 | config.add_view( |
|
1024 | config.add_view( | |
1025 | AdminReposView, |
|
1025 | AdminReposView, | |
1026 | attr='repository_list_data', |
|
1026 | attr='repository_list_data', | |
1027 | route_name='repos_data', request_method='GET', |
|
1027 | route_name='repos_data', request_method='GET', | |
1028 | renderer='json_ext', xhr=True) |
|
1028 | renderer='json_ext', xhr=True) | |
1029 |
|
1029 | |||
1030 | config.add_route( |
|
1030 | config.add_route( | |
1031 | name='repo_new', |
|
1031 | name='repo_new', | |
1032 | pattern='/repos/new') |
|
1032 | pattern='/repos/new') | |
1033 | config.add_view( |
|
1033 | config.add_view( | |
1034 | AdminReposView, |
|
1034 | AdminReposView, | |
1035 | attr='repository_new', |
|
1035 | attr='repository_new', | |
1036 | route_name='repo_new', request_method='GET', |
|
1036 | route_name='repo_new', request_method='GET', | |
1037 | renderer='rhodecode:templates/admin/repos/repo_add.mako') |
|
1037 | renderer='rhodecode:templates/admin/repos/repo_add.mako') | |
1038 |
|
1038 | |||
1039 | config.add_route( |
|
1039 | config.add_route( | |
1040 | name='repo_create', |
|
1040 | name='repo_create', | |
1041 | pattern='/repos/create') |
|
1041 | pattern='/repos/create') | |
1042 | config.add_view( |
|
1042 | config.add_view( | |
1043 | AdminReposView, |
|
1043 | AdminReposView, | |
1044 | attr='repository_create', |
|
1044 | attr='repository_create', | |
1045 | route_name='repo_create', request_method='POST', |
|
1045 | route_name='repo_create', request_method='POST', | |
1046 | renderer='rhodecode:templates/admin/repos/repos.mako') |
|
1046 | renderer='rhodecode:templates/admin/repos/repos.mako') | |
1047 |
|
1047 | |||
1048 | # repo groups admin |
|
1048 | # repo groups admin | |
1049 | config.add_route( |
|
1049 | config.add_route( | |
1050 | name='repo_groups', |
|
1050 | name='repo_groups', | |
1051 | pattern='/repo_groups') |
|
1051 | pattern='/repo_groups') | |
1052 | config.add_view( |
|
1052 | config.add_view( | |
1053 | AdminRepoGroupsView, |
|
1053 | AdminRepoGroupsView, | |
1054 | attr='repo_group_list', |
|
1054 | attr='repo_group_list', | |
1055 | route_name='repo_groups', request_method='GET', |
|
1055 | route_name='repo_groups', request_method='GET', | |
1056 | renderer='rhodecode:templates/admin/repo_groups/repo_groups.mako') |
|
1056 | renderer='rhodecode:templates/admin/repo_groups/repo_groups.mako') | |
1057 |
|
1057 | |||
1058 | config.add_route( |
|
1058 | config.add_route( | |
1059 | name='repo_groups_data', |
|
1059 | name='repo_groups_data', | |
1060 | pattern='/repo_groups_data') |
|
1060 | pattern='/repo_groups_data') | |
1061 | config.add_view( |
|
1061 | config.add_view( | |
1062 | AdminRepoGroupsView, |
|
1062 | AdminRepoGroupsView, | |
1063 | attr='repo_group_list_data', |
|
1063 | attr='repo_group_list_data', | |
1064 | route_name='repo_groups_data', request_method='GET', |
|
1064 | route_name='repo_groups_data', request_method='GET', | |
1065 | renderer='json_ext', xhr=True) |
|
1065 | renderer='json_ext', xhr=True) | |
1066 |
|
1066 | |||
1067 | config.add_route( |
|
1067 | config.add_route( | |
1068 | name='repo_group_new', |
|
1068 | name='repo_group_new', | |
1069 | pattern='/repo_group/new') |
|
1069 | pattern='/repo_group/new') | |
1070 | config.add_view( |
|
1070 | config.add_view( | |
1071 | AdminRepoGroupsView, |
|
1071 | AdminRepoGroupsView, | |
1072 | attr='repo_group_new', |
|
1072 | attr='repo_group_new', | |
1073 | route_name='repo_group_new', request_method='GET', |
|
1073 | route_name='repo_group_new', request_method='GET', | |
1074 | renderer='rhodecode:templates/admin/repo_groups/repo_group_add.mako') |
|
1074 | renderer='rhodecode:templates/admin/repo_groups/repo_group_add.mako') | |
1075 |
|
1075 | |||
1076 | config.add_route( |
|
1076 | config.add_route( | |
1077 | name='repo_group_create', |
|
1077 | name='repo_group_create', | |
1078 | pattern='/repo_group/create') |
|
1078 | pattern='/repo_group/create') | |
1079 | config.add_view( |
|
1079 | config.add_view( | |
1080 | AdminRepoGroupsView, |
|
1080 | AdminRepoGroupsView, | |
1081 | attr='repo_group_create', |
|
1081 | attr='repo_group_create', | |
1082 | route_name='repo_group_create', request_method='POST', |
|
1082 | route_name='repo_group_create', request_method='POST', | |
1083 | renderer='rhodecode:templates/admin/repo_groups/repo_group_add.mako') |
|
1083 | renderer='rhodecode:templates/admin/repo_groups/repo_group_add.mako') | |
1084 |
|
1084 | |||
1085 |
|
1085 | |||
1086 | def includeme(config): |
|
1086 | def includeme(config): | |
1087 | # Create admin navigation registry and add it to the pyramid registry. |
|
1087 | # Create admin navigation registry and add it to the pyramid registry. | |
1088 | nav_includeme(config) |
|
1088 | nav_includeme(config) | |
1089 |
|
1089 | |||
1090 | # main admin routes |
|
1090 | # main admin routes | |
1091 | config.add_route( |
|
1091 | config.add_route( | |
1092 | name='admin_home', pattern=ADMIN_PREFIX) |
|
1092 | name='admin_home', pattern=ADMIN_PREFIX) | |
1093 | config.add_view( |
|
1093 | config.add_view( | |
1094 | AdminMainView, |
|
1094 | AdminMainView, | |
1095 | attr='admin_main', |
|
1095 | attr='admin_main', | |
1096 | route_name='admin_home', request_method='GET', |
|
1096 | route_name='admin_home', request_method='GET', | |
1097 | renderer='rhodecode:templates/admin/main.mako') |
|
1097 | renderer='rhodecode:templates/admin/main.mako') | |
1098 |
|
1098 | |||
1099 | # pr global redirect |
|
1099 | # pr global redirect | |
1100 | config.add_route( |
|
1100 | config.add_route( | |
1101 | name='pull_requests_global_0', # backward compat |
|
1101 | name='pull_requests_global_0', # backward compat | |
1102 | pattern=ADMIN_PREFIX + r'/pull_requests/{pull_request_id:\d+}') |
|
1102 | pattern=ADMIN_PREFIX + r'/pull_requests/{pull_request_id:\d+}') | |
1103 | config.add_view( |
|
1103 | config.add_view( | |
1104 | AdminMainView, |
|
1104 | AdminMainView, | |
1105 | attr='pull_requests', |
|
1105 | attr='pull_requests', | |
1106 | route_name='pull_requests_global_0', request_method='GET') |
|
1106 | route_name='pull_requests_global_0', request_method='GET') | |
1107 |
|
1107 | |||
1108 | config.add_route( |
|
1108 | config.add_route( | |
1109 | name='pull_requests_global_1', # backward compat |
|
1109 | name='pull_requests_global_1', # backward compat | |
1110 | pattern=ADMIN_PREFIX + r'/pull-requests/{pull_request_id:\d+}') |
|
1110 | pattern=ADMIN_PREFIX + r'/pull-requests/{pull_request_id:\d+}') | |
1111 | config.add_view( |
|
1111 | config.add_view( | |
1112 | AdminMainView, |
|
1112 | AdminMainView, | |
1113 | attr='pull_requests', |
|
1113 | attr='pull_requests', | |
1114 | route_name='pull_requests_global_1', request_method='GET') |
|
1114 | route_name='pull_requests_global_1', request_method='GET') | |
1115 |
|
1115 | |||
1116 | config.add_route( |
|
1116 | config.add_route( | |
1117 | name='pull_requests_global', |
|
1117 | name='pull_requests_global', | |
1118 | pattern=ADMIN_PREFIX + r'/pull-request/{pull_request_id:\d+}') |
|
1118 | pattern=ADMIN_PREFIX + r'/pull-request/{pull_request_id:\d+}') | |
1119 | config.add_view( |
|
1119 | config.add_view( | |
1120 | AdminMainView, |
|
1120 | AdminMainView, | |
1121 | attr='pull_requests', |
|
1121 | attr='pull_requests', | |
1122 | route_name='pull_requests_global', request_method='GET') |
|
1122 | route_name='pull_requests_global', request_method='GET') | |
1123 |
|
1123 | |||
1124 | config.include(admin_routes, route_prefix=ADMIN_PREFIX) |
|
1124 | config.include(admin_routes, route_prefix=ADMIN_PREFIX) |
General Comments 0
You need to be logged in to leave comments.
Login now