##// END OF EJS Templates
permissions: expose new view that lists all available views for usage in whitelist access.
marcink -
r1943:089c11e9 default
parent child Browse files
Show More
@@ -0,0 +1,61 b''
1
2
3 <div class="panel panel-default">
4 <div class="panel-heading">
5 <h3 class="panel-title">${_('View whitelist')}</h3>
6 </div>
7 <div class="panel-body">
8 <div class="">
9
10 <p class="pr-description">
11 View white list defines a set of views that can be accessed using auth token without the need to login.
12 Adding ?auth_token = SECRET_TOKEN to the url authenticates this request as if it
13 came from the the logged in user who owns this authentication token.
14
15 E.g. adding `RepoFilesView.repo_file_raw` allows to access a raw diff using such url:
16 http[s]://server.com/{repo_name}/raw/{commit_id}/{file_path}?auth_token=SECRET_TOKEN
17
18 White list can be defined inside `${c.whitelist_file}` under `${c.whitelist_key}=` setting
19
20 Currently under this settings following views are set:
21 </p>
22
23 <pre>
24 % for entry in c.whitelist_views:
25 ${entry}
26 % endfor
27 </pre>
28
29 </div>
30
31 </div>
32 </div>
33
34
35 <div class="panel panel-default">
36 <div class="panel-heading">
37 <h3 class="panel-title">${_('List of views available for usage in whitelist access')}</h3>
38 </div>
39 <div class="panel-body">
40 <div class="">
41
42
43 <table class="rctable ip-whitelist">
44 <tr>
45 <th>Active</th>
46 <th>View FQN</th>
47 <th>URL pattern</th>
48 </tr>
49
50 % for route_name, view_fqn, view_url, active in c.view_data:
51 <tr>
52 <td class="td-x">${h.bool2icon(active)}</td>
53 <td class="td-x">${view_fqn}</td>
54 <td class="td-x" title="${route_name}">${view_url}</td>
55 </tr>
56 % endfor
57 </table>
58 </div>
59
60 </div>
61 </div>
@@ -1,678 +1,677 b''
1
1
2
2
3 ################################################################################
3 ################################################################################
4 ## RHODECODE COMMUNITY EDITION CONFIGURATION ##
4 ## RHODECODE COMMUNITY EDITION CONFIGURATION ##
5 # The %(here)s variable will be replaced with the parent directory of this file#
5 # The %(here)s variable will be replaced with the parent directory of this file#
6 ################################################################################
6 ################################################################################
7
7
8 [DEFAULT]
8 [DEFAULT]
9 debug = true
9 debug = true
10
10
11 ################################################################################
11 ################################################################################
12 ## EMAIL CONFIGURATION ##
12 ## EMAIL CONFIGURATION ##
13 ## Uncomment and replace with the email address which should receive ##
13 ## Uncomment and replace with the email address which should receive ##
14 ## any error reports after an application crash ##
14 ## any error reports after an application crash ##
15 ## Additionally these settings will be used by the RhodeCode mailing system ##
15 ## Additionally these settings will be used by the RhodeCode mailing system ##
16 ################################################################################
16 ################################################################################
17
17
18 ## prefix all emails subjects with given prefix, helps filtering out emails
18 ## prefix all emails subjects with given prefix, helps filtering out emails
19 #email_prefix = [RhodeCode]
19 #email_prefix = [RhodeCode]
20
20
21 ## email FROM address all mails will be sent
21 ## email FROM address all mails will be sent
22 #app_email_from = rhodecode-noreply@localhost
22 #app_email_from = rhodecode-noreply@localhost
23
23
24 ## Uncomment and replace with the address which should receive any error report
24 ## Uncomment and replace with the address which should receive any error report
25 ## note: using appenlight for error handling doesn't need this to be uncommented
25 ## note: using appenlight for error handling doesn't need this to be uncommented
26 #email_to = admin@localhost
26 #email_to = admin@localhost
27
27
28 ## in case of Application errors, sent an error email form
28 ## in case of Application errors, sent an error email form
29 #error_email_from = rhodecode_error@localhost
29 #error_email_from = rhodecode_error@localhost
30
30
31 ## additional error message to be send in case of server crash
31 ## additional error message to be send in case of server crash
32 #error_message =
32 #error_message =
33
33
34
34
35 #smtp_server = mail.server.com
35 #smtp_server = mail.server.com
36 #smtp_username =
36 #smtp_username =
37 #smtp_password =
37 #smtp_password =
38 #smtp_port =
38 #smtp_port =
39 #smtp_use_tls = false
39 #smtp_use_tls = false
40 #smtp_use_ssl = true
40 #smtp_use_ssl = true
41 ## Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.)
41 ## Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.)
42 #smtp_auth =
42 #smtp_auth =
43
43
44 [server:main]
44 [server:main]
45 ## COMMON ##
45 ## COMMON ##
46 host = 127.0.0.1
46 host = 127.0.0.1
47 port = 5000
47 port = 5000
48
48
49 ##################################
49 ##################################
50 ## WAITRESS WSGI SERVER ##
50 ## WAITRESS WSGI SERVER ##
51 ## Recommended for Development ##
51 ## Recommended for Development ##
52 ##################################
52 ##################################
53
53
54 use = egg:waitress#main
54 use = egg:waitress#main
55 ## number of worker threads
55 ## number of worker threads
56 threads = 5
56 threads = 5
57 ## MAX BODY SIZE 100GB
57 ## MAX BODY SIZE 100GB
58 max_request_body_size = 107374182400
58 max_request_body_size = 107374182400
59 ## Use poll instead of select, fixes file descriptors limits problems.
59 ## Use poll instead of select, fixes file descriptors limits problems.
60 ## May not work on old windows systems.
60 ## May not work on old windows systems.
61 asyncore_use_poll = true
61 asyncore_use_poll = true
62
62
63
63
64 ##########################
64 ##########################
65 ## GUNICORN WSGI SERVER ##
65 ## GUNICORN WSGI SERVER ##
66 ##########################
66 ##########################
67 ## run with gunicorn --log-config rhodecode.ini --paste rhodecode.ini
67 ## run with gunicorn --log-config rhodecode.ini --paste rhodecode.ini
68
68
69 #use = egg:gunicorn#main
69 #use = egg:gunicorn#main
70 ## Sets the number of process workers. You must set `instance_id = *`
70 ## Sets the number of process workers. You must set `instance_id = *`
71 ## when this option is set to more than one worker, recommended
71 ## when this option is set to more than one worker, recommended
72 ## value is (2 * NUMBER_OF_CPUS + 1), eg 2CPU = 5 workers
72 ## value is (2 * NUMBER_OF_CPUS + 1), eg 2CPU = 5 workers
73 ## The `instance_id = *` must be set in the [app:main] section below
73 ## The `instance_id = *` must be set in the [app:main] section below
74 #workers = 2
74 #workers = 2
75 ## number of threads for each of the worker, must be set to 1 for gevent
75 ## number of threads for each of the worker, must be set to 1 for gevent
76 ## generally recommened to be at 1
76 ## generally recommened to be at 1
77 #threads = 1
77 #threads = 1
78 ## process name
78 ## process name
79 #proc_name = rhodecode
79 #proc_name = rhodecode
80 ## type of worker class, one of sync, gevent
80 ## type of worker class, one of sync, gevent
81 ## recommended for bigger setup is using of of other than sync one
81 ## recommended for bigger setup is using of of other than sync one
82 #worker_class = sync
82 #worker_class = sync
83 ## The maximum number of simultaneous clients. Valid only for Gevent
83 ## The maximum number of simultaneous clients. Valid only for Gevent
84 #worker_connections = 10
84 #worker_connections = 10
85 ## max number of requests that worker will handle before being gracefully
85 ## max number of requests that worker will handle before being gracefully
86 ## restarted, could prevent memory leaks
86 ## restarted, could prevent memory leaks
87 #max_requests = 1000
87 #max_requests = 1000
88 #max_requests_jitter = 30
88 #max_requests_jitter = 30
89 ## amount of time a worker can spend with handling a request before it
89 ## amount of time a worker can spend with handling a request before it
90 ## gets killed and restarted. Set to 6hrs
90 ## gets killed and restarted. Set to 6hrs
91 #timeout = 21600
91 #timeout = 21600
92
92
93
93
94 ## prefix middleware for RhodeCode.
94 ## prefix middleware for RhodeCode.
95 ## recommended when using proxy setup.
95 ## recommended when using proxy setup.
96 ## allows to set RhodeCode under a prefix in server.
96 ## allows to set RhodeCode under a prefix in server.
97 ## eg https://server.com/custom_prefix. Enable `filter-with =` option below as well.
97 ## eg https://server.com/custom_prefix. Enable `filter-with =` option below as well.
98 ## And set your prefix like: `prefix = /custom_prefix`
98 ## And set your prefix like: `prefix = /custom_prefix`
99 ## be sure to also set beaker.session.cookie_path = /custom_prefix if you need
99 ## be sure to also set beaker.session.cookie_path = /custom_prefix if you need
100 ## to make your cookies only work on prefix url
100 ## to make your cookies only work on prefix url
101 [filter:proxy-prefix]
101 [filter:proxy-prefix]
102 use = egg:PasteDeploy#prefix
102 use = egg:PasteDeploy#prefix
103 prefix = /
103 prefix = /
104
104
105 [app:main]
105 [app:main]
106 use = egg:rhodecode-enterprise-ce
106 use = egg:rhodecode-enterprise-ce
107
107
108 ## enable proxy prefix middleware, defined above
108 ## enable proxy prefix middleware, defined above
109 #filter-with = proxy-prefix
109 #filter-with = proxy-prefix
110
110
111 # During development the we want to have the debug toolbar enabled
111 # During development the we want to have the debug toolbar enabled
112 pyramid.includes =
112 pyramid.includes =
113 pyramid_debugtoolbar
113 pyramid_debugtoolbar
114 rhodecode.utils.debugtoolbar
114 rhodecode.utils.debugtoolbar
115 rhodecode.lib.middleware.request_wrapper
115 rhodecode.lib.middleware.request_wrapper
116
116
117 pyramid.reload_templates = true
117 pyramid.reload_templates = true
118
118
119 debugtoolbar.hosts = 0.0.0.0/0
119 debugtoolbar.hosts = 0.0.0.0/0
120 debugtoolbar.exclude_prefixes =
120 debugtoolbar.exclude_prefixes =
121 /css
121 /css
122 /fonts
122 /fonts
123 /images
123 /images
124 /js
124 /js
125
125
126 ## RHODECODE PLUGINS ##
126 ## RHODECODE PLUGINS ##
127 rhodecode.includes =
127 rhodecode.includes =
128 rhodecode.api
128 rhodecode.api
129
129
130
130
131 # api prefix url
131 # api prefix url
132 rhodecode.api.url = /_admin/api
132 rhodecode.api.url = /_admin/api
133
133
134
134
135 ## END RHODECODE PLUGINS ##
135 ## END RHODECODE PLUGINS ##
136
136
137 ## encryption key used to encrypt social plugin tokens,
137 ## encryption key used to encrypt social plugin tokens,
138 ## remote_urls with credentials etc, if not set it defaults to
138 ## remote_urls with credentials etc, if not set it defaults to
139 ## `beaker.session.secret`
139 ## `beaker.session.secret`
140 #rhodecode.encrypted_values.secret =
140 #rhodecode.encrypted_values.secret =
141
141
142 ## decryption strict mode (enabled by default). It controls if decryption raises
142 ## decryption strict mode (enabled by default). It controls if decryption raises
143 ## `SignatureVerificationError` in case of wrong key, or damaged encryption data.
143 ## `SignatureVerificationError` in case of wrong key, or damaged encryption data.
144 #rhodecode.encrypted_values.strict = false
144 #rhodecode.encrypted_values.strict = false
145
145
146 ## return gzipped responses from Rhodecode (static files/application)
146 ## return gzipped responses from Rhodecode (static files/application)
147 gzip_responses = false
147 gzip_responses = false
148
148
149 ## autogenerate javascript routes file on startup
149 ## autogenerate javascript routes file on startup
150 generate_js_files = false
150 generate_js_files = false
151
151
152 ## Optional Languages
152 ## Optional Languages
153 ## en(default), be, de, es, fr, it, ja, pl, pt, ru, zh
153 ## en(default), be, de, es, fr, it, ja, pl, pt, ru, zh
154 lang = en
154 lang = en
155
155
156 ## perform a full repository scan on each server start, this should be
156 ## perform a full repository scan on each server start, this should be
157 ## set to false after first startup, to allow faster server restarts.
157 ## set to false after first startup, to allow faster server restarts.
158 startup.import_repos = false
158 startup.import_repos = false
159
159
160 ## Uncomment and set this path to use archive download cache.
160 ## Uncomment and set this path to use archive download cache.
161 ## Once enabled, generated archives will be cached at this location
161 ## Once enabled, generated archives will be cached at this location
162 ## and served from the cache during subsequent requests for the same archive of
162 ## and served from the cache during subsequent requests for the same archive of
163 ## the repository.
163 ## the repository.
164 #archive_cache_dir = /tmp/tarballcache
164 #archive_cache_dir = /tmp/tarballcache
165
165
166 ## change this to unique ID for security
166 ## change this to unique ID for security
167 app_instance_uuid = rc-production
167 app_instance_uuid = rc-production
168
168
169 ## cut off limit for large diffs (size in bytes)
169 ## cut off limit for large diffs (size in bytes)
170 cut_off_limit_diff = 1024000
170 cut_off_limit_diff = 1024000
171 cut_off_limit_file = 256000
171 cut_off_limit_file = 256000
172
172
173 ## use cache version of scm repo everywhere
173 ## use cache version of scm repo everywhere
174 vcs_full_cache = true
174 vcs_full_cache = true
175
175
176 ## force https in RhodeCode, fixes https redirects, assumes it's always https
176 ## force https in RhodeCode, fixes https redirects, assumes it's always https
177 ## Normally this is controlled by proper http flags sent from http server
177 ## Normally this is controlled by proper http flags sent from http server
178 force_https = false
178 force_https = false
179
179
180 ## use Strict-Transport-Security headers
180 ## use Strict-Transport-Security headers
181 use_htsts = false
181 use_htsts = false
182
182
183 ## number of commits stats will parse on each iteration
183 ## number of commits stats will parse on each iteration
184 commit_parse_limit = 25
184 commit_parse_limit = 25
185
185
186 ## git rev filter option, --all is the default filter, if you need to
186 ## git rev filter option, --all is the default filter, if you need to
187 ## hide all refs in changelog switch this to --branches --tags
187 ## hide all refs in changelog switch this to --branches --tags
188 git_rev_filter = --branches --tags
188 git_rev_filter = --branches --tags
189
189
190 # Set to true if your repos are exposed using the dumb protocol
190 # Set to true if your repos are exposed using the dumb protocol
191 git_update_server_info = false
191 git_update_server_info = false
192
192
193 ## RSS/ATOM feed options
193 ## RSS/ATOM feed options
194 rss_cut_off_limit = 256000
194 rss_cut_off_limit = 256000
195 rss_items_per_page = 10
195 rss_items_per_page = 10
196 rss_include_diff = false
196 rss_include_diff = false
197
197
198 ## gist URL alias, used to create nicer urls for gist. This should be an
198 ## gist URL alias, used to create nicer urls for gist. This should be an
199 ## url that does rewrites to _admin/gists/{gistid}.
199 ## url that does rewrites to _admin/gists/{gistid}.
200 ## example: http://gist.rhodecode.org/{gistid}. Empty means use the internal
200 ## example: http://gist.rhodecode.org/{gistid}. Empty means use the internal
201 ## RhodeCode url, ie. http[s]://rhodecode.server/_admin/gists/{gistid}
201 ## RhodeCode url, ie. http[s]://rhodecode.server/_admin/gists/{gistid}
202 gist_alias_url =
202 gist_alias_url =
203
203
204 ## List of controllers (using glob pattern syntax) that AUTH TOKENS could be
204 ## List of views (using glob pattern syntax) that AUTH TOKENS could be
205 ## used for access.
205 ## used for access.
206 ## Adding ?auth_token=TOKEN_HASH to the url authenticates this request as if it
206 ## Adding ?auth_token=TOKEN_HASH to the url authenticates this request as if it
207 ## came from the the logged in user who own this authentication token.
207 ## came from the the logged in user who own this authentication token.
208 ##
208 ##
209 ## Syntax is ControllerClass:function_pattern.
209 ## list of all views can be found under `_admin/permissions/auth_token_access`
210 ## To enable access to raw_files put `FilesController:raw`.
211 ## To enable access to patches add `ChangesetController:changeset_patch`.
212 ## The list should be "," separated and on a single line.
210 ## The list should be "," separated and on a single line.
213 ##
211 ##
214 ## Recommended controllers to enable:
212 ## Most common views to enable:
215 # ChangesetController:changeset_patch,
213 # ChangesetController:changeset_patch
216 # ChangesetController:changeset_raw,
214 # ChangesetController:changeset_raw
217 # FilesController:raw,
215 # RepoFilesView.repo_files_diff
218 # FilesController:archivefile,
216 # RepoFilesView.repo_archivefile
219 # GistsController:*,
217 # RepoFilesView.repo_file_raw
218 # GistView:*
220 api_access_controllers_whitelist =
219 api_access_controllers_whitelist =
221
220
222 ## default encoding used to convert from and to unicode
221 ## default encoding used to convert from and to unicode
223 ## can be also a comma separated list of encoding in case of mixed encodings
222 ## can be also a comma separated list of encoding in case of mixed encodings
224 default_encoding = UTF-8
223 default_encoding = UTF-8
225
224
226 ## instance-id prefix
225 ## instance-id prefix
227 ## a prefix key for this instance used for cache invalidation when running
226 ## a prefix key for this instance used for cache invalidation when running
228 ## multiple instances of rhodecode, make sure it's globally unique for
227 ## multiple instances of rhodecode, make sure it's globally unique for
229 ## all running rhodecode instances. Leave empty if you don't use it
228 ## all running rhodecode instances. Leave empty if you don't use it
230 instance_id =
229 instance_id =
231
230
232 ## Fallback authentication plugin. Set this to a plugin ID to force the usage
231 ## Fallback authentication plugin. Set this to a plugin ID to force the usage
233 ## of an authentication plugin also if it is disabled by it's settings.
232 ## of an authentication plugin also if it is disabled by it's settings.
234 ## This could be useful if you are unable to log in to the system due to broken
233 ## This could be useful if you are unable to log in to the system due to broken
235 ## authentication settings. Then you can enable e.g. the internal rhodecode auth
234 ## authentication settings. Then you can enable e.g. the internal rhodecode auth
236 ## module to log in again and fix the settings.
235 ## module to log in again and fix the settings.
237 ##
236 ##
238 ## Available builtin plugin IDs (hash is part of the ID):
237 ## Available builtin plugin IDs (hash is part of the ID):
239 ## egg:rhodecode-enterprise-ce#rhodecode
238 ## egg:rhodecode-enterprise-ce#rhodecode
240 ## egg:rhodecode-enterprise-ce#pam
239 ## egg:rhodecode-enterprise-ce#pam
241 ## egg:rhodecode-enterprise-ce#ldap
240 ## egg:rhodecode-enterprise-ce#ldap
242 ## egg:rhodecode-enterprise-ce#jasig_cas
241 ## egg:rhodecode-enterprise-ce#jasig_cas
243 ## egg:rhodecode-enterprise-ce#headers
242 ## egg:rhodecode-enterprise-ce#headers
244 ## egg:rhodecode-enterprise-ce#crowd
243 ## egg:rhodecode-enterprise-ce#crowd
245 #rhodecode.auth_plugin_fallback = egg:rhodecode-enterprise-ce#rhodecode
244 #rhodecode.auth_plugin_fallback = egg:rhodecode-enterprise-ce#rhodecode
246
245
247 ## alternative return HTTP header for failed authentication. Default HTTP
246 ## alternative return HTTP header for failed authentication. Default HTTP
248 ## response is 401 HTTPUnauthorized. Currently HG clients have troubles with
247 ## response is 401 HTTPUnauthorized. Currently HG clients have troubles with
249 ## handling that causing a series of failed authentication calls.
248 ## handling that causing a series of failed authentication calls.
250 ## Set this variable to 403 to return HTTPForbidden, or any other HTTP code
249 ## Set this variable to 403 to return HTTPForbidden, or any other HTTP code
251 ## This will be served instead of default 401 on bad authnetication
250 ## This will be served instead of default 401 on bad authnetication
252 auth_ret_code =
251 auth_ret_code =
253
252
254 ## use special detection method when serving auth_ret_code, instead of serving
253 ## use special detection method when serving auth_ret_code, instead of serving
255 ## ret_code directly, use 401 initially (Which triggers credentials prompt)
254 ## ret_code directly, use 401 initially (Which triggers credentials prompt)
256 ## and then serve auth_ret_code to clients
255 ## and then serve auth_ret_code to clients
257 auth_ret_code_detection = false
256 auth_ret_code_detection = false
258
257
259 ## locking return code. When repository is locked return this HTTP code. 2XX
258 ## locking return code. When repository is locked return this HTTP code. 2XX
260 ## codes don't break the transactions while 4XX codes do
259 ## codes don't break the transactions while 4XX codes do
261 lock_ret_code = 423
260 lock_ret_code = 423
262
261
263 ## allows to change the repository location in settings page
262 ## allows to change the repository location in settings page
264 allow_repo_location_change = true
263 allow_repo_location_change = true
265
264
266 ## allows to setup custom hooks in settings page
265 ## allows to setup custom hooks in settings page
267 allow_custom_hooks_settings = true
266 allow_custom_hooks_settings = true
268
267
269 ## generated license token, goto license page in RhodeCode settings to obtain
268 ## generated license token, goto license page in RhodeCode settings to obtain
270 ## new token
269 ## new token
271 license_token =
270 license_token =
272
271
273 ## supervisor connection uri, for managing supervisor and logs.
272 ## supervisor connection uri, for managing supervisor and logs.
274 supervisor.uri =
273 supervisor.uri =
275 ## supervisord group name/id we only want this RC instance to handle
274 ## supervisord group name/id we only want this RC instance to handle
276 supervisor.group_id = dev
275 supervisor.group_id = dev
277
276
278 ## Display extended labs settings
277 ## Display extended labs settings
279 labs_settings_active = true
278 labs_settings_active = true
280
279
281 ####################################
280 ####################################
282 ### CELERY CONFIG ####
281 ### CELERY CONFIG ####
283 ####################################
282 ####################################
284 use_celery = false
283 use_celery = false
285 broker.host = localhost
284 broker.host = localhost
286 broker.vhost = rabbitmqhost
285 broker.vhost = rabbitmqhost
287 broker.port = 5672
286 broker.port = 5672
288 broker.user = rabbitmq
287 broker.user = rabbitmq
289 broker.password = qweqwe
288 broker.password = qweqwe
290
289
291 celery.imports = rhodecode.lib.celerylib.tasks
290 celery.imports = rhodecode.lib.celerylib.tasks
292
291
293 celery.result.backend = amqp
292 celery.result.backend = amqp
294 celery.result.dburi = amqp://
293 celery.result.dburi = amqp://
295 celery.result.serialier = json
294 celery.result.serialier = json
296
295
297 #celery.send.task.error.emails = true
296 #celery.send.task.error.emails = true
298 #celery.amqp.task.result.expires = 18000
297 #celery.amqp.task.result.expires = 18000
299
298
300 celeryd.concurrency = 2
299 celeryd.concurrency = 2
301 #celeryd.log.file = celeryd.log
300 #celeryd.log.file = celeryd.log
302 celeryd.log.level = debug
301 celeryd.log.level = debug
303 celeryd.max.tasks.per.child = 1
302 celeryd.max.tasks.per.child = 1
304
303
305 ## tasks will never be sent to the queue, but executed locally instead.
304 ## tasks will never be sent to the queue, but executed locally instead.
306 celery.always.eager = false
305 celery.always.eager = false
307
306
308 ####################################
307 ####################################
309 ### BEAKER CACHE ####
308 ### BEAKER CACHE ####
310 ####################################
309 ####################################
311 # default cache dir for templates. Putting this into a ramdisk
310 # default cache dir for templates. Putting this into a ramdisk
312 ## can boost performance, eg. %(here)s/data_ramdisk
311 ## can boost performance, eg. %(here)s/data_ramdisk
313 cache_dir = %(here)s/data
312 cache_dir = %(here)s/data
314
313
315 ## locking and default file storage for Beaker. Putting this into a ramdisk
314 ## locking and default file storage for Beaker. Putting this into a ramdisk
316 ## can boost performance, eg. %(here)s/data_ramdisk/cache/beaker_data
315 ## can boost performance, eg. %(here)s/data_ramdisk/cache/beaker_data
317 beaker.cache.data_dir = %(here)s/data/cache/beaker_data
316 beaker.cache.data_dir = %(here)s/data/cache/beaker_data
318 beaker.cache.lock_dir = %(here)s/data/cache/beaker_lock
317 beaker.cache.lock_dir = %(here)s/data/cache/beaker_lock
319
318
320 beaker.cache.regions = super_short_term, short_term, long_term, sql_cache_short, auth_plugins, repo_cache_long
319 beaker.cache.regions = super_short_term, short_term, long_term, sql_cache_short, auth_plugins, repo_cache_long
321
320
322 beaker.cache.super_short_term.type = memory
321 beaker.cache.super_short_term.type = memory
323 beaker.cache.super_short_term.expire = 10
322 beaker.cache.super_short_term.expire = 10
324 beaker.cache.super_short_term.key_length = 256
323 beaker.cache.super_short_term.key_length = 256
325
324
326 beaker.cache.short_term.type = memory
325 beaker.cache.short_term.type = memory
327 beaker.cache.short_term.expire = 60
326 beaker.cache.short_term.expire = 60
328 beaker.cache.short_term.key_length = 256
327 beaker.cache.short_term.key_length = 256
329
328
330 beaker.cache.long_term.type = memory
329 beaker.cache.long_term.type = memory
331 beaker.cache.long_term.expire = 36000
330 beaker.cache.long_term.expire = 36000
332 beaker.cache.long_term.key_length = 256
331 beaker.cache.long_term.key_length = 256
333
332
334 beaker.cache.sql_cache_short.type = memory
333 beaker.cache.sql_cache_short.type = memory
335 beaker.cache.sql_cache_short.expire = 10
334 beaker.cache.sql_cache_short.expire = 10
336 beaker.cache.sql_cache_short.key_length = 256
335 beaker.cache.sql_cache_short.key_length = 256
337
336
338 ## default is memory cache, configure only if required
337 ## default is memory cache, configure only if required
339 ## using multi-node or multi-worker setup
338 ## using multi-node or multi-worker setup
340 #beaker.cache.auth_plugins.type = ext:database
339 #beaker.cache.auth_plugins.type = ext:database
341 #beaker.cache.auth_plugins.lock_dir = %(here)s/data/cache/auth_plugin_lock
340 #beaker.cache.auth_plugins.lock_dir = %(here)s/data/cache/auth_plugin_lock
342 #beaker.cache.auth_plugins.url = postgresql://postgres:secret@localhost/rhodecode
341 #beaker.cache.auth_plugins.url = postgresql://postgres:secret@localhost/rhodecode
343 #beaker.cache.auth_plugins.url = mysql://root:secret@127.0.0.1/rhodecode
342 #beaker.cache.auth_plugins.url = mysql://root:secret@127.0.0.1/rhodecode
344 #beaker.cache.auth_plugins.sa.pool_recycle = 3600
343 #beaker.cache.auth_plugins.sa.pool_recycle = 3600
345 #beaker.cache.auth_plugins.sa.pool_size = 10
344 #beaker.cache.auth_plugins.sa.pool_size = 10
346 #beaker.cache.auth_plugins.sa.max_overflow = 0
345 #beaker.cache.auth_plugins.sa.max_overflow = 0
347
346
348 beaker.cache.repo_cache_long.type = memorylru_base
347 beaker.cache.repo_cache_long.type = memorylru_base
349 beaker.cache.repo_cache_long.max_items = 4096
348 beaker.cache.repo_cache_long.max_items = 4096
350 beaker.cache.repo_cache_long.expire = 2592000
349 beaker.cache.repo_cache_long.expire = 2592000
351
350
352 ## default is memorylru_base cache, configure only if required
351 ## default is memorylru_base cache, configure only if required
353 ## using multi-node or multi-worker setup
352 ## using multi-node or multi-worker setup
354 #beaker.cache.repo_cache_long.type = ext:memcached
353 #beaker.cache.repo_cache_long.type = ext:memcached
355 #beaker.cache.repo_cache_long.url = localhost:11211
354 #beaker.cache.repo_cache_long.url = localhost:11211
356 #beaker.cache.repo_cache_long.expire = 1209600
355 #beaker.cache.repo_cache_long.expire = 1209600
357 #beaker.cache.repo_cache_long.key_length = 256
356 #beaker.cache.repo_cache_long.key_length = 256
358
357
359 ####################################
358 ####################################
360 ### BEAKER SESSION ####
359 ### BEAKER SESSION ####
361 ####################################
360 ####################################
362
361
363 ## .session.type is type of storage options for the session, current allowed
362 ## .session.type is type of storage options for the session, current allowed
364 ## types are file, ext:memcached, ext:database, and memory (default).
363 ## types are file, ext:memcached, ext:database, and memory (default).
365 beaker.session.type = file
364 beaker.session.type = file
366 beaker.session.data_dir = %(here)s/data/sessions/data
365 beaker.session.data_dir = %(here)s/data/sessions/data
367
366
368 ## db based session, fast, and allows easy management over logged in users
367 ## db based session, fast, and allows easy management over logged in users
369 #beaker.session.type = ext:database
368 #beaker.session.type = ext:database
370 #beaker.session.table_name = db_session
369 #beaker.session.table_name = db_session
371 #beaker.session.sa.url = postgresql://postgres:secret@localhost/rhodecode
370 #beaker.session.sa.url = postgresql://postgres:secret@localhost/rhodecode
372 #beaker.session.sa.url = mysql://root:secret@127.0.0.1/rhodecode
371 #beaker.session.sa.url = mysql://root:secret@127.0.0.1/rhodecode
373 #beaker.session.sa.pool_recycle = 3600
372 #beaker.session.sa.pool_recycle = 3600
374 #beaker.session.sa.echo = false
373 #beaker.session.sa.echo = false
375
374
376 beaker.session.key = rhodecode
375 beaker.session.key = rhodecode
377 beaker.session.secret = develop-rc-uytcxaz
376 beaker.session.secret = develop-rc-uytcxaz
378 beaker.session.lock_dir = %(here)s/data/sessions/lock
377 beaker.session.lock_dir = %(here)s/data/sessions/lock
379
378
380 ## Secure encrypted cookie. Requires AES and AES python libraries
379 ## Secure encrypted cookie. Requires AES and AES python libraries
381 ## you must disable beaker.session.secret to use this
380 ## you must disable beaker.session.secret to use this
382 #beaker.session.encrypt_key = key_for_encryption
381 #beaker.session.encrypt_key = key_for_encryption
383 #beaker.session.validate_key = validation_key
382 #beaker.session.validate_key = validation_key
384
383
385 ## sets session as invalid(also logging out user) if it haven not been
384 ## sets session as invalid(also logging out user) if it haven not been
386 ## accessed for given amount of time in seconds
385 ## accessed for given amount of time in seconds
387 beaker.session.timeout = 2592000
386 beaker.session.timeout = 2592000
388 beaker.session.httponly = true
387 beaker.session.httponly = true
389 ## Path to use for the cookie. Set to prefix if you use prefix middleware
388 ## Path to use for the cookie. Set to prefix if you use prefix middleware
390 #beaker.session.cookie_path = /custom_prefix
389 #beaker.session.cookie_path = /custom_prefix
391
390
392 ## uncomment for https secure cookie
391 ## uncomment for https secure cookie
393 beaker.session.secure = false
392 beaker.session.secure = false
394
393
395 ## auto save the session to not to use .save()
394 ## auto save the session to not to use .save()
396 beaker.session.auto = false
395 beaker.session.auto = false
397
396
398 ## default cookie expiration time in seconds, set to `true` to set expire
397 ## default cookie expiration time in seconds, set to `true` to set expire
399 ## at browser close
398 ## at browser close
400 #beaker.session.cookie_expires = 3600
399 #beaker.session.cookie_expires = 3600
401
400
402 ###################################
401 ###################################
403 ## SEARCH INDEXING CONFIGURATION ##
402 ## SEARCH INDEXING CONFIGURATION ##
404 ###################################
403 ###################################
405 ## Full text search indexer is available in rhodecode-tools under
404 ## Full text search indexer is available in rhodecode-tools under
406 ## `rhodecode-tools index` command
405 ## `rhodecode-tools index` command
407
406
408 ## WHOOSH Backend, doesn't require additional services to run
407 ## WHOOSH Backend, doesn't require additional services to run
409 ## it works good with few dozen repos
408 ## it works good with few dozen repos
410 search.module = rhodecode.lib.index.whoosh
409 search.module = rhodecode.lib.index.whoosh
411 search.location = %(here)s/data/index
410 search.location = %(here)s/data/index
412
411
413 ########################################
412 ########################################
414 ### CHANNELSTREAM CONFIG ####
413 ### CHANNELSTREAM CONFIG ####
415 ########################################
414 ########################################
416 ## channelstream enables persistent connections and live notification
415 ## channelstream enables persistent connections and live notification
417 ## in the system. It's also used by the chat system
416 ## in the system. It's also used by the chat system
418 channelstream.enabled = false
417 channelstream.enabled = false
419
418
420 ## server address for channelstream server on the backend
419 ## server address for channelstream server on the backend
421 channelstream.server = 127.0.0.1:9800
420 channelstream.server = 127.0.0.1:9800
422
421
423 ## location of the channelstream server from outside world
422 ## location of the channelstream server from outside world
424 ## use ws:// for http or wss:// for https. This address needs to be handled
423 ## use ws:// for http or wss:// for https. This address needs to be handled
425 ## by external HTTP server such as Nginx or Apache
424 ## by external HTTP server such as Nginx or Apache
426 ## see nginx/apache configuration examples in our docs
425 ## see nginx/apache configuration examples in our docs
427 channelstream.ws_url = ws://rhodecode.yourserver.com/_channelstream
426 channelstream.ws_url = ws://rhodecode.yourserver.com/_channelstream
428 channelstream.secret = secret
427 channelstream.secret = secret
429 channelstream.history.location = %(here)s/channelstream_history
428 channelstream.history.location = %(here)s/channelstream_history
430
429
431 ## Internal application path that Javascript uses to connect into.
430 ## Internal application path that Javascript uses to connect into.
432 ## If you use proxy-prefix the prefix should be added before /_channelstream
431 ## If you use proxy-prefix the prefix should be added before /_channelstream
433 channelstream.proxy_path = /_channelstream
432 channelstream.proxy_path = /_channelstream
434
433
435
434
436 ###################################
435 ###################################
437 ## APPENLIGHT CONFIG ##
436 ## APPENLIGHT CONFIG ##
438 ###################################
437 ###################################
439
438
440 ## Appenlight is tailored to work with RhodeCode, see
439 ## Appenlight is tailored to work with RhodeCode, see
441 ## http://appenlight.com for details how to obtain an account
440 ## http://appenlight.com for details how to obtain an account
442
441
443 ## appenlight integration enabled
442 ## appenlight integration enabled
444 appenlight = false
443 appenlight = false
445
444
446 appenlight.server_url = https://api.appenlight.com
445 appenlight.server_url = https://api.appenlight.com
447 appenlight.api_key = YOUR_API_KEY
446 appenlight.api_key = YOUR_API_KEY
448 #appenlight.transport_config = https://api.appenlight.com?threaded=1&timeout=5
447 #appenlight.transport_config = https://api.appenlight.com?threaded=1&timeout=5
449
448
450 # used for JS client
449 # used for JS client
451 appenlight.api_public_key = YOUR_API_PUBLIC_KEY
450 appenlight.api_public_key = YOUR_API_PUBLIC_KEY
452
451
453 ## TWEAK AMOUNT OF INFO SENT HERE
452 ## TWEAK AMOUNT OF INFO SENT HERE
454
453
455 ## enables 404 error logging (default False)
454 ## enables 404 error logging (default False)
456 appenlight.report_404 = false
455 appenlight.report_404 = false
457
456
458 ## time in seconds after request is considered being slow (default 1)
457 ## time in seconds after request is considered being slow (default 1)
459 appenlight.slow_request_time = 1
458 appenlight.slow_request_time = 1
460
459
461 ## record slow requests in application
460 ## record slow requests in application
462 ## (needs to be enabled for slow datastore recording and time tracking)
461 ## (needs to be enabled for slow datastore recording and time tracking)
463 appenlight.slow_requests = true
462 appenlight.slow_requests = true
464
463
465 ## enable hooking to application loggers
464 ## enable hooking to application loggers
466 appenlight.logging = true
465 appenlight.logging = true
467
466
468 ## minimum log level for log capture
467 ## minimum log level for log capture
469 appenlight.logging.level = WARNING
468 appenlight.logging.level = WARNING
470
469
471 ## send logs only from erroneous/slow requests
470 ## send logs only from erroneous/slow requests
472 ## (saves API quota for intensive logging)
471 ## (saves API quota for intensive logging)
473 appenlight.logging_on_error = false
472 appenlight.logging_on_error = false
474
473
475 ## list of additonal keywords that should be grabbed from environ object
474 ## list of additonal keywords that should be grabbed from environ object
476 ## can be string with comma separated list of words in lowercase
475 ## can be string with comma separated list of words in lowercase
477 ## (by default client will always send following info:
476 ## (by default client will always send following info:
478 ## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that
477 ## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that
479 ## start with HTTP* this list be extended with additional keywords here
478 ## start with HTTP* this list be extended with additional keywords here
480 appenlight.environ_keys_whitelist =
479 appenlight.environ_keys_whitelist =
481
480
482 ## list of keywords that should be blanked from request object
481 ## list of keywords that should be blanked from request object
483 ## can be string with comma separated list of words in lowercase
482 ## can be string with comma separated list of words in lowercase
484 ## (by default client will always blank keys that contain following words
483 ## (by default client will always blank keys that contain following words
485 ## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf'
484 ## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf'
486 ## this list be extended with additional keywords set here
485 ## this list be extended with additional keywords set here
487 appenlight.request_keys_blacklist =
486 appenlight.request_keys_blacklist =
488
487
489 ## list of namespaces that should be ignores when gathering log entries
488 ## list of namespaces that should be ignores when gathering log entries
490 ## can be string with comma separated list of namespaces
489 ## can be string with comma separated list of namespaces
491 ## (by default the client ignores own entries: appenlight_client.client)
490 ## (by default the client ignores own entries: appenlight_client.client)
492 appenlight.log_namespace_blacklist =
491 appenlight.log_namespace_blacklist =
493
492
494
493
495 ################################################################################
494 ################################################################################
496 ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ##
495 ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ##
497 ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ##
496 ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ##
498 ## execute malicious code after an exception is raised. ##
497 ## execute malicious code after an exception is raised. ##
499 ################################################################################
498 ################################################################################
500 #set debug = false
499 #set debug = false
501
500
502
501
503 ##############
502 ##############
504 ## STYLING ##
503 ## STYLING ##
505 ##############
504 ##############
506 debug_style = true
505 debug_style = true
507
506
508 ###########################################
507 ###########################################
509 ### MAIN RHODECODE DATABASE CONFIG ###
508 ### MAIN RHODECODE DATABASE CONFIG ###
510 ###########################################
509 ###########################################
511 #sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db?timeout=30
510 #sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db?timeout=30
512 #sqlalchemy.db1.url = postgresql://postgres:qweqwe@localhost/rhodecode
511 #sqlalchemy.db1.url = postgresql://postgres:qweqwe@localhost/rhodecode
513 #sqlalchemy.db1.url = mysql://root:qweqwe@localhost/rhodecode
512 #sqlalchemy.db1.url = mysql://root:qweqwe@localhost/rhodecode
514 sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db?timeout=30
513 sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db?timeout=30
515
514
516 # see sqlalchemy docs for other advanced settings
515 # see sqlalchemy docs for other advanced settings
517
516
518 ## print the sql statements to output
517 ## print the sql statements to output
519 sqlalchemy.db1.echo = false
518 sqlalchemy.db1.echo = false
520 ## recycle the connections after this amount of seconds
519 ## recycle the connections after this amount of seconds
521 sqlalchemy.db1.pool_recycle = 3600
520 sqlalchemy.db1.pool_recycle = 3600
522 sqlalchemy.db1.convert_unicode = true
521 sqlalchemy.db1.convert_unicode = true
523
522
524 ## the number of connections to keep open inside the connection pool.
523 ## the number of connections to keep open inside the connection pool.
525 ## 0 indicates no limit
524 ## 0 indicates no limit
526 #sqlalchemy.db1.pool_size = 5
525 #sqlalchemy.db1.pool_size = 5
527
526
528 ## the number of connections to allow in connection pool "overflow", that is
527 ## the number of connections to allow in connection pool "overflow", that is
529 ## connections that can be opened above and beyond the pool_size setting,
528 ## connections that can be opened above and beyond the pool_size setting,
530 ## which defaults to five.
529 ## which defaults to five.
531 #sqlalchemy.db1.max_overflow = 10
530 #sqlalchemy.db1.max_overflow = 10
532
531
533
532
534 ##################
533 ##################
535 ### VCS CONFIG ###
534 ### VCS CONFIG ###
536 ##################
535 ##################
537 vcs.server.enable = true
536 vcs.server.enable = true
538 vcs.server = localhost:9900
537 vcs.server = localhost:9900
539
538
540 ## Web server connectivity protocol, responsible for web based VCS operatations
539 ## Web server connectivity protocol, responsible for web based VCS operatations
541 ## Available protocols are:
540 ## Available protocols are:
542 ## `http` - use http-rpc backend (default)
541 ## `http` - use http-rpc backend (default)
543 vcs.server.protocol = http
542 vcs.server.protocol = http
544
543
545 ## Push/Pull operations protocol, available options are:
544 ## Push/Pull operations protocol, available options are:
546 ## `http` - use http-rpc backend (default)
545 ## `http` - use http-rpc backend (default)
547 ##
546 ##
548 vcs.scm_app_implementation = http
547 vcs.scm_app_implementation = http
549
548
550 ## Push/Pull operations hooks protocol, available options are:
549 ## Push/Pull operations hooks protocol, available options are:
551 ## `http` - use http-rpc backend (default)
550 ## `http` - use http-rpc backend (default)
552 vcs.hooks.protocol = http
551 vcs.hooks.protocol = http
553
552
554 vcs.server.log_level = debug
553 vcs.server.log_level = debug
555 ## Start VCSServer with this instance as a subprocess, usefull for development
554 ## Start VCSServer with this instance as a subprocess, usefull for development
556 vcs.start_server = true
555 vcs.start_server = true
557
556
558 ## List of enabled VCS backends, available options are:
557 ## List of enabled VCS backends, available options are:
559 ## `hg` - mercurial
558 ## `hg` - mercurial
560 ## `git` - git
559 ## `git` - git
561 ## `svn` - subversion
560 ## `svn` - subversion
562 vcs.backends = hg, git, svn
561 vcs.backends = hg, git, svn
563
562
564 vcs.connection_timeout = 3600
563 vcs.connection_timeout = 3600
565 ## Compatibility version when creating SVN repositories. Defaults to newest version when commented out.
564 ## Compatibility version when creating SVN repositories. Defaults to newest version when commented out.
566 ## Available options are: pre-1.4-compatible, pre-1.5-compatible, pre-1.6-compatible, pre-1.8-compatible
565 ## Available options are: pre-1.4-compatible, pre-1.5-compatible, pre-1.6-compatible, pre-1.8-compatible
567 #vcs.svn.compatible_version = pre-1.8-compatible
566 #vcs.svn.compatible_version = pre-1.8-compatible
568
567
569
568
570 ############################################################
569 ############################################################
571 ### Subversion proxy support (mod_dav_svn) ###
570 ### Subversion proxy support (mod_dav_svn) ###
572 ### Maps RhodeCode repo groups into SVN paths for Apache ###
571 ### Maps RhodeCode repo groups into SVN paths for Apache ###
573 ############################################################
572 ############################################################
574 ## Enable or disable the config file generation.
573 ## Enable or disable the config file generation.
575 svn.proxy.generate_config = false
574 svn.proxy.generate_config = false
576 ## Generate config file with `SVNListParentPath` set to `On`.
575 ## Generate config file with `SVNListParentPath` set to `On`.
577 svn.proxy.list_parent_path = true
576 svn.proxy.list_parent_path = true
578 ## Set location and file name of generated config file.
577 ## Set location and file name of generated config file.
579 svn.proxy.config_file_path = %(here)s/mod_dav_svn.conf
578 svn.proxy.config_file_path = %(here)s/mod_dav_svn.conf
580 ## Used as a prefix to the `Location` block in the generated config file.
579 ## Used as a prefix to the `Location` block in the generated config file.
581 ## In most cases it should be set to `/`.
580 ## In most cases it should be set to `/`.
582 svn.proxy.location_root = /
581 svn.proxy.location_root = /
583 ## Command to reload the mod dav svn configuration on change.
582 ## Command to reload the mod dav svn configuration on change.
584 ## Example: `/etc/init.d/apache2 reload`
583 ## Example: `/etc/init.d/apache2 reload`
585 #svn.proxy.reload_cmd = /etc/init.d/apache2 reload
584 #svn.proxy.reload_cmd = /etc/init.d/apache2 reload
586 ## If the timeout expires before the reload command finishes, the command will
585 ## If the timeout expires before the reload command finishes, the command will
587 ## be killed. Setting it to zero means no timeout. Defaults to 10 seconds.
586 ## be killed. Setting it to zero means no timeout. Defaults to 10 seconds.
588 #svn.proxy.reload_timeout = 10
587 #svn.proxy.reload_timeout = 10
589
588
590 ## Dummy marker to add new entries after.
589 ## Dummy marker to add new entries after.
591 ## Add any custom entries below. Please don't remove.
590 ## Add any custom entries below. Please don't remove.
592 custom.conf = 1
591 custom.conf = 1
593
592
594
593
595 ################################
594 ################################
596 ### LOGGING CONFIGURATION ####
595 ### LOGGING CONFIGURATION ####
597 ################################
596 ################################
598 [loggers]
597 [loggers]
599 keys = root, routes, rhodecode, sqlalchemy, beaker, templates
598 keys = root, routes, rhodecode, sqlalchemy, beaker, templates
600
599
601 [handlers]
600 [handlers]
602 keys = console, console_sql
601 keys = console, console_sql
603
602
604 [formatters]
603 [formatters]
605 keys = generic, color_formatter, color_formatter_sql
604 keys = generic, color_formatter, color_formatter_sql
606
605
607 #############
606 #############
608 ## LOGGERS ##
607 ## LOGGERS ##
609 #############
608 #############
610 [logger_root]
609 [logger_root]
611 level = NOTSET
610 level = NOTSET
612 handlers = console
611 handlers = console
613
612
614 [logger_routes]
613 [logger_routes]
615 level = DEBUG
614 level = DEBUG
616 handlers =
615 handlers =
617 qualname = routes.middleware
616 qualname = routes.middleware
618 ## "level = DEBUG" logs the route matched and routing variables.
617 ## "level = DEBUG" logs the route matched and routing variables.
619 propagate = 1
618 propagate = 1
620
619
621 [logger_beaker]
620 [logger_beaker]
622 level = DEBUG
621 level = DEBUG
623 handlers =
622 handlers =
624 qualname = beaker.container
623 qualname = beaker.container
625 propagate = 1
624 propagate = 1
626
625
627 [logger_templates]
626 [logger_templates]
628 level = INFO
627 level = INFO
629 handlers =
628 handlers =
630 qualname = pylons.templating
629 qualname = pylons.templating
631 propagate = 1
630 propagate = 1
632
631
633 [logger_rhodecode]
632 [logger_rhodecode]
634 level = DEBUG
633 level = DEBUG
635 handlers =
634 handlers =
636 qualname = rhodecode
635 qualname = rhodecode
637 propagate = 1
636 propagate = 1
638
637
639 [logger_sqlalchemy]
638 [logger_sqlalchemy]
640 level = INFO
639 level = INFO
641 handlers = console_sql
640 handlers = console_sql
642 qualname = sqlalchemy.engine
641 qualname = sqlalchemy.engine
643 propagate = 0
642 propagate = 0
644
643
645 ##############
644 ##############
646 ## HANDLERS ##
645 ## HANDLERS ##
647 ##############
646 ##############
648
647
649 [handler_console]
648 [handler_console]
650 class = StreamHandler
649 class = StreamHandler
651 args = (sys.stderr, )
650 args = (sys.stderr, )
652 level = DEBUG
651 level = DEBUG
653 formatter = color_formatter
652 formatter = color_formatter
654
653
655 [handler_console_sql]
654 [handler_console_sql]
656 class = StreamHandler
655 class = StreamHandler
657 args = (sys.stderr, )
656 args = (sys.stderr, )
658 level = DEBUG
657 level = DEBUG
659 formatter = color_formatter_sql
658 formatter = color_formatter_sql
660
659
661 ################
660 ################
662 ## FORMATTERS ##
661 ## FORMATTERS ##
663 ################
662 ################
664
663
665 [formatter_generic]
664 [formatter_generic]
666 class = rhodecode.lib.logging_formatter.ExceptionAwareFormatter
665 class = rhodecode.lib.logging_formatter.ExceptionAwareFormatter
667 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
666 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
668 datefmt = %Y-%m-%d %H:%M:%S
667 datefmt = %Y-%m-%d %H:%M:%S
669
668
670 [formatter_color_formatter]
669 [formatter_color_formatter]
671 class = rhodecode.lib.logging_formatter.ColorFormatter
670 class = rhodecode.lib.logging_formatter.ColorFormatter
672 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
671 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
673 datefmt = %Y-%m-%d %H:%M:%S
672 datefmt = %Y-%m-%d %H:%M:%S
674
673
675 [formatter_color_formatter_sql]
674 [formatter_color_formatter_sql]
676 class = rhodecode.lib.logging_formatter.ColorFormatterSql
675 class = rhodecode.lib.logging_formatter.ColorFormatterSql
677 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
676 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
678 datefmt = %Y-%m-%d %H:%M:%S
677 datefmt = %Y-%m-%d %H:%M:%S
@@ -1,647 +1,646 b''
1
1
2
2
3 ################################################################################
3 ################################################################################
4 ## RHODECODE COMMUNITY EDITION CONFIGURATION ##
4 ## RHODECODE COMMUNITY EDITION CONFIGURATION ##
5 # The %(here)s variable will be replaced with the parent directory of this file#
5 # The %(here)s variable will be replaced with the parent directory of this file#
6 ################################################################################
6 ################################################################################
7
7
8 [DEFAULT]
8 [DEFAULT]
9 debug = true
9 debug = true
10
10
11 ################################################################################
11 ################################################################################
12 ## EMAIL CONFIGURATION ##
12 ## EMAIL CONFIGURATION ##
13 ## Uncomment and replace with the email address which should receive ##
13 ## Uncomment and replace with the email address which should receive ##
14 ## any error reports after an application crash ##
14 ## any error reports after an application crash ##
15 ## Additionally these settings will be used by the RhodeCode mailing system ##
15 ## Additionally these settings will be used by the RhodeCode mailing system ##
16 ################################################################################
16 ################################################################################
17
17
18 ## prefix all emails subjects with given prefix, helps filtering out emails
18 ## prefix all emails subjects with given prefix, helps filtering out emails
19 #email_prefix = [RhodeCode]
19 #email_prefix = [RhodeCode]
20
20
21 ## email FROM address all mails will be sent
21 ## email FROM address all mails will be sent
22 #app_email_from = rhodecode-noreply@localhost
22 #app_email_from = rhodecode-noreply@localhost
23
23
24 ## Uncomment and replace with the address which should receive any error report
24 ## Uncomment and replace with the address which should receive any error report
25 ## note: using appenlight for error handling doesn't need this to be uncommented
25 ## note: using appenlight for error handling doesn't need this to be uncommented
26 #email_to = admin@localhost
26 #email_to = admin@localhost
27
27
28 ## in case of Application errors, sent an error email form
28 ## in case of Application errors, sent an error email form
29 #error_email_from = rhodecode_error@localhost
29 #error_email_from = rhodecode_error@localhost
30
30
31 ## additional error message to be send in case of server crash
31 ## additional error message to be send in case of server crash
32 #error_message =
32 #error_message =
33
33
34
34
35 #smtp_server = mail.server.com
35 #smtp_server = mail.server.com
36 #smtp_username =
36 #smtp_username =
37 #smtp_password =
37 #smtp_password =
38 #smtp_port =
38 #smtp_port =
39 #smtp_use_tls = false
39 #smtp_use_tls = false
40 #smtp_use_ssl = true
40 #smtp_use_ssl = true
41 ## Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.)
41 ## Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.)
42 #smtp_auth =
42 #smtp_auth =
43
43
44 [server:main]
44 [server:main]
45 ## COMMON ##
45 ## COMMON ##
46 host = 127.0.0.1
46 host = 127.0.0.1
47 port = 5000
47 port = 5000
48
48
49 ##################################
49 ##################################
50 ## WAITRESS WSGI SERVER ##
50 ## WAITRESS WSGI SERVER ##
51 ## Recommended for Development ##
51 ## Recommended for Development ##
52 ##################################
52 ##################################
53
53
54 #use = egg:waitress#main
54 #use = egg:waitress#main
55 ## number of worker threads
55 ## number of worker threads
56 #threads = 5
56 #threads = 5
57 ## MAX BODY SIZE 100GB
57 ## MAX BODY SIZE 100GB
58 #max_request_body_size = 107374182400
58 #max_request_body_size = 107374182400
59 ## Use poll instead of select, fixes file descriptors limits problems.
59 ## Use poll instead of select, fixes file descriptors limits problems.
60 ## May not work on old windows systems.
60 ## May not work on old windows systems.
61 #asyncore_use_poll = true
61 #asyncore_use_poll = true
62
62
63
63
64 ##########################
64 ##########################
65 ## GUNICORN WSGI SERVER ##
65 ## GUNICORN WSGI SERVER ##
66 ##########################
66 ##########################
67 ## run with gunicorn --log-config rhodecode.ini --paste rhodecode.ini
67 ## run with gunicorn --log-config rhodecode.ini --paste rhodecode.ini
68
68
69 use = egg:gunicorn#main
69 use = egg:gunicorn#main
70 ## Sets the number of process workers. You must set `instance_id = *`
70 ## Sets the number of process workers. You must set `instance_id = *`
71 ## when this option is set to more than one worker, recommended
71 ## when this option is set to more than one worker, recommended
72 ## value is (2 * NUMBER_OF_CPUS + 1), eg 2CPU = 5 workers
72 ## value is (2 * NUMBER_OF_CPUS + 1), eg 2CPU = 5 workers
73 ## The `instance_id = *` must be set in the [app:main] section below
73 ## The `instance_id = *` must be set in the [app:main] section below
74 workers = 2
74 workers = 2
75 ## number of threads for each of the worker, must be set to 1 for gevent
75 ## number of threads for each of the worker, must be set to 1 for gevent
76 ## generally recommened to be at 1
76 ## generally recommened to be at 1
77 #threads = 1
77 #threads = 1
78 ## process name
78 ## process name
79 proc_name = rhodecode
79 proc_name = rhodecode
80 ## type of worker class, one of sync, gevent
80 ## type of worker class, one of sync, gevent
81 ## recommended for bigger setup is using of of other than sync one
81 ## recommended for bigger setup is using of of other than sync one
82 worker_class = sync
82 worker_class = sync
83 ## The maximum number of simultaneous clients. Valid only for Gevent
83 ## The maximum number of simultaneous clients. Valid only for Gevent
84 #worker_connections = 10
84 #worker_connections = 10
85 ## max number of requests that worker will handle before being gracefully
85 ## max number of requests that worker will handle before being gracefully
86 ## restarted, could prevent memory leaks
86 ## restarted, could prevent memory leaks
87 max_requests = 1000
87 max_requests = 1000
88 max_requests_jitter = 30
88 max_requests_jitter = 30
89 ## amount of time a worker can spend with handling a request before it
89 ## amount of time a worker can spend with handling a request before it
90 ## gets killed and restarted. Set to 6hrs
90 ## gets killed and restarted. Set to 6hrs
91 timeout = 21600
91 timeout = 21600
92
92
93
93
94 ## prefix middleware for RhodeCode.
94 ## prefix middleware for RhodeCode.
95 ## recommended when using proxy setup.
95 ## recommended when using proxy setup.
96 ## allows to set RhodeCode under a prefix in server.
96 ## allows to set RhodeCode under a prefix in server.
97 ## eg https://server.com/custom_prefix. Enable `filter-with =` option below as well.
97 ## eg https://server.com/custom_prefix. Enable `filter-with =` option below as well.
98 ## And set your prefix like: `prefix = /custom_prefix`
98 ## And set your prefix like: `prefix = /custom_prefix`
99 ## be sure to also set beaker.session.cookie_path = /custom_prefix if you need
99 ## be sure to also set beaker.session.cookie_path = /custom_prefix if you need
100 ## to make your cookies only work on prefix url
100 ## to make your cookies only work on prefix url
101 [filter:proxy-prefix]
101 [filter:proxy-prefix]
102 use = egg:PasteDeploy#prefix
102 use = egg:PasteDeploy#prefix
103 prefix = /
103 prefix = /
104
104
105 [app:main]
105 [app:main]
106 use = egg:rhodecode-enterprise-ce
106 use = egg:rhodecode-enterprise-ce
107
107
108 ## enable proxy prefix middleware, defined above
108 ## enable proxy prefix middleware, defined above
109 #filter-with = proxy-prefix
109 #filter-with = proxy-prefix
110
110
111 ## encryption key used to encrypt social plugin tokens,
111 ## encryption key used to encrypt social plugin tokens,
112 ## remote_urls with credentials etc, if not set it defaults to
112 ## remote_urls with credentials etc, if not set it defaults to
113 ## `beaker.session.secret`
113 ## `beaker.session.secret`
114 #rhodecode.encrypted_values.secret =
114 #rhodecode.encrypted_values.secret =
115
115
116 ## decryption strict mode (enabled by default). It controls if decryption raises
116 ## decryption strict mode (enabled by default). It controls if decryption raises
117 ## `SignatureVerificationError` in case of wrong key, or damaged encryption data.
117 ## `SignatureVerificationError` in case of wrong key, or damaged encryption data.
118 #rhodecode.encrypted_values.strict = false
118 #rhodecode.encrypted_values.strict = false
119
119
120 ## return gzipped responses from Rhodecode (static files/application)
120 ## return gzipped responses from Rhodecode (static files/application)
121 gzip_responses = false
121 gzip_responses = false
122
122
123 ## autogenerate javascript routes file on startup
123 ## autogenerate javascript routes file on startup
124 generate_js_files = false
124 generate_js_files = false
125
125
126 ## Optional Languages
126 ## Optional Languages
127 ## en(default), be, de, es, fr, it, ja, pl, pt, ru, zh
127 ## en(default), be, de, es, fr, it, ja, pl, pt, ru, zh
128 lang = en
128 lang = en
129
129
130 ## perform a full repository scan on each server start, this should be
130 ## perform a full repository scan on each server start, this should be
131 ## set to false after first startup, to allow faster server restarts.
131 ## set to false after first startup, to allow faster server restarts.
132 startup.import_repos = false
132 startup.import_repos = false
133
133
134 ## Uncomment and set this path to use archive download cache.
134 ## Uncomment and set this path to use archive download cache.
135 ## Once enabled, generated archives will be cached at this location
135 ## Once enabled, generated archives will be cached at this location
136 ## and served from the cache during subsequent requests for the same archive of
136 ## and served from the cache during subsequent requests for the same archive of
137 ## the repository.
137 ## the repository.
138 #archive_cache_dir = /tmp/tarballcache
138 #archive_cache_dir = /tmp/tarballcache
139
139
140 ## change this to unique ID for security
140 ## change this to unique ID for security
141 app_instance_uuid = rc-production
141 app_instance_uuid = rc-production
142
142
143 ## cut off limit for large diffs (size in bytes)
143 ## cut off limit for large diffs (size in bytes)
144 cut_off_limit_diff = 1024000
144 cut_off_limit_diff = 1024000
145 cut_off_limit_file = 256000
145 cut_off_limit_file = 256000
146
146
147 ## use cache version of scm repo everywhere
147 ## use cache version of scm repo everywhere
148 vcs_full_cache = true
148 vcs_full_cache = true
149
149
150 ## force https in RhodeCode, fixes https redirects, assumes it's always https
150 ## force https in RhodeCode, fixes https redirects, assumes it's always https
151 ## Normally this is controlled by proper http flags sent from http server
151 ## Normally this is controlled by proper http flags sent from http server
152 force_https = false
152 force_https = false
153
153
154 ## use Strict-Transport-Security headers
154 ## use Strict-Transport-Security headers
155 use_htsts = false
155 use_htsts = false
156
156
157 ## number of commits stats will parse on each iteration
157 ## number of commits stats will parse on each iteration
158 commit_parse_limit = 25
158 commit_parse_limit = 25
159
159
160 ## git rev filter option, --all is the default filter, if you need to
160 ## git rev filter option, --all is the default filter, if you need to
161 ## hide all refs in changelog switch this to --branches --tags
161 ## hide all refs in changelog switch this to --branches --tags
162 git_rev_filter = --branches --tags
162 git_rev_filter = --branches --tags
163
163
164 # Set to true if your repos are exposed using the dumb protocol
164 # Set to true if your repos are exposed using the dumb protocol
165 git_update_server_info = false
165 git_update_server_info = false
166
166
167 ## RSS/ATOM feed options
167 ## RSS/ATOM feed options
168 rss_cut_off_limit = 256000
168 rss_cut_off_limit = 256000
169 rss_items_per_page = 10
169 rss_items_per_page = 10
170 rss_include_diff = false
170 rss_include_diff = false
171
171
172 ## gist URL alias, used to create nicer urls for gist. This should be an
172 ## gist URL alias, used to create nicer urls for gist. This should be an
173 ## url that does rewrites to _admin/gists/{gistid}.
173 ## url that does rewrites to _admin/gists/{gistid}.
174 ## example: http://gist.rhodecode.org/{gistid}. Empty means use the internal
174 ## example: http://gist.rhodecode.org/{gistid}. Empty means use the internal
175 ## RhodeCode url, ie. http[s]://rhodecode.server/_admin/gists/{gistid}
175 ## RhodeCode url, ie. http[s]://rhodecode.server/_admin/gists/{gistid}
176 gist_alias_url =
176 gist_alias_url =
177
177
178 ## List of controllers (using glob pattern syntax) that AUTH TOKENS could be
178 ## List of views (using glob pattern syntax) that AUTH TOKENS could be
179 ## used for access.
179 ## used for access.
180 ## Adding ?auth_token=TOKEN_HASH to the url authenticates this request as if it
180 ## Adding ?auth_token=TOKEN_HASH to the url authenticates this request as if it
181 ## came from the the logged in user who own this authentication token.
181 ## came from the the logged in user who own this authentication token.
182 ##
182 ##
183 ## Syntax is ControllerClass:function_pattern.
183 ## list of all views can be found under `_admin/permissions/auth_token_access`
184 ## To enable access to raw_files put `FilesController:raw`.
185 ## To enable access to patches add `ChangesetController:changeset_patch`.
186 ## The list should be "," separated and on a single line.
184 ## The list should be "," separated and on a single line.
187 ##
185 ##
188 ## Recommended controllers to enable:
186 ## Most common views to enable:
189 # ChangesetController:changeset_patch,
187 # ChangesetController:changeset_patch
190 # ChangesetController:changeset_raw,
188 # ChangesetController:changeset_raw
191 # FilesController:raw,
189 # RepoFilesView.repo_files_diff
192 # FilesController:archivefile,
190 # RepoFilesView.repo_archivefile
193 # GistsController:*,
191 # RepoFilesView.repo_file_raw
192 # GistView:*
194 api_access_controllers_whitelist =
193 api_access_controllers_whitelist =
195
194
196 ## default encoding used to convert from and to unicode
195 ## default encoding used to convert from and to unicode
197 ## can be also a comma separated list of encoding in case of mixed encodings
196 ## can be also a comma separated list of encoding in case of mixed encodings
198 default_encoding = UTF-8
197 default_encoding = UTF-8
199
198
200 ## instance-id prefix
199 ## instance-id prefix
201 ## a prefix key for this instance used for cache invalidation when running
200 ## a prefix key for this instance used for cache invalidation when running
202 ## multiple instances of rhodecode, make sure it's globally unique for
201 ## multiple instances of rhodecode, make sure it's globally unique for
203 ## all running rhodecode instances. Leave empty if you don't use it
202 ## all running rhodecode instances. Leave empty if you don't use it
204 instance_id =
203 instance_id =
205
204
206 ## Fallback authentication plugin. Set this to a plugin ID to force the usage
205 ## Fallback authentication plugin. Set this to a plugin ID to force the usage
207 ## of an authentication plugin also if it is disabled by it's settings.
206 ## of an authentication plugin also if it is disabled by it's settings.
208 ## This could be useful if you are unable to log in to the system due to broken
207 ## This could be useful if you are unable to log in to the system due to broken
209 ## authentication settings. Then you can enable e.g. the internal rhodecode auth
208 ## authentication settings. Then you can enable e.g. the internal rhodecode auth
210 ## module to log in again and fix the settings.
209 ## module to log in again and fix the settings.
211 ##
210 ##
212 ## Available builtin plugin IDs (hash is part of the ID):
211 ## Available builtin plugin IDs (hash is part of the ID):
213 ## egg:rhodecode-enterprise-ce#rhodecode
212 ## egg:rhodecode-enterprise-ce#rhodecode
214 ## egg:rhodecode-enterprise-ce#pam
213 ## egg:rhodecode-enterprise-ce#pam
215 ## egg:rhodecode-enterprise-ce#ldap
214 ## egg:rhodecode-enterprise-ce#ldap
216 ## egg:rhodecode-enterprise-ce#jasig_cas
215 ## egg:rhodecode-enterprise-ce#jasig_cas
217 ## egg:rhodecode-enterprise-ce#headers
216 ## egg:rhodecode-enterprise-ce#headers
218 ## egg:rhodecode-enterprise-ce#crowd
217 ## egg:rhodecode-enterprise-ce#crowd
219 #rhodecode.auth_plugin_fallback = egg:rhodecode-enterprise-ce#rhodecode
218 #rhodecode.auth_plugin_fallback = egg:rhodecode-enterprise-ce#rhodecode
220
219
221 ## alternative return HTTP header for failed authentication. Default HTTP
220 ## alternative return HTTP header for failed authentication. Default HTTP
222 ## response is 401 HTTPUnauthorized. Currently HG clients have troubles with
221 ## response is 401 HTTPUnauthorized. Currently HG clients have troubles with
223 ## handling that causing a series of failed authentication calls.
222 ## handling that causing a series of failed authentication calls.
224 ## Set this variable to 403 to return HTTPForbidden, or any other HTTP code
223 ## Set this variable to 403 to return HTTPForbidden, or any other HTTP code
225 ## This will be served instead of default 401 on bad authnetication
224 ## This will be served instead of default 401 on bad authnetication
226 auth_ret_code =
225 auth_ret_code =
227
226
228 ## use special detection method when serving auth_ret_code, instead of serving
227 ## use special detection method when serving auth_ret_code, instead of serving
229 ## ret_code directly, use 401 initially (Which triggers credentials prompt)
228 ## ret_code directly, use 401 initially (Which triggers credentials prompt)
230 ## and then serve auth_ret_code to clients
229 ## and then serve auth_ret_code to clients
231 auth_ret_code_detection = false
230 auth_ret_code_detection = false
232
231
233 ## locking return code. When repository is locked return this HTTP code. 2XX
232 ## locking return code. When repository is locked return this HTTP code. 2XX
234 ## codes don't break the transactions while 4XX codes do
233 ## codes don't break the transactions while 4XX codes do
235 lock_ret_code = 423
234 lock_ret_code = 423
236
235
237 ## allows to change the repository location in settings page
236 ## allows to change the repository location in settings page
238 allow_repo_location_change = true
237 allow_repo_location_change = true
239
238
240 ## allows to setup custom hooks in settings page
239 ## allows to setup custom hooks in settings page
241 allow_custom_hooks_settings = true
240 allow_custom_hooks_settings = true
242
241
243 ## generated license token, goto license page in RhodeCode settings to obtain
242 ## generated license token, goto license page in RhodeCode settings to obtain
244 ## new token
243 ## new token
245 license_token =
244 license_token =
246
245
247 ## supervisor connection uri, for managing supervisor and logs.
246 ## supervisor connection uri, for managing supervisor and logs.
248 supervisor.uri =
247 supervisor.uri =
249 ## supervisord group name/id we only want this RC instance to handle
248 ## supervisord group name/id we only want this RC instance to handle
250 supervisor.group_id = prod
249 supervisor.group_id = prod
251
250
252 ## Display extended labs settings
251 ## Display extended labs settings
253 labs_settings_active = true
252 labs_settings_active = true
254
253
255 ####################################
254 ####################################
256 ### CELERY CONFIG ####
255 ### CELERY CONFIG ####
257 ####################################
256 ####################################
258 use_celery = false
257 use_celery = false
259 broker.host = localhost
258 broker.host = localhost
260 broker.vhost = rabbitmqhost
259 broker.vhost = rabbitmqhost
261 broker.port = 5672
260 broker.port = 5672
262 broker.user = rabbitmq
261 broker.user = rabbitmq
263 broker.password = qweqwe
262 broker.password = qweqwe
264
263
265 celery.imports = rhodecode.lib.celerylib.tasks
264 celery.imports = rhodecode.lib.celerylib.tasks
266
265
267 celery.result.backend = amqp
266 celery.result.backend = amqp
268 celery.result.dburi = amqp://
267 celery.result.dburi = amqp://
269 celery.result.serialier = json
268 celery.result.serialier = json
270
269
271 #celery.send.task.error.emails = true
270 #celery.send.task.error.emails = true
272 #celery.amqp.task.result.expires = 18000
271 #celery.amqp.task.result.expires = 18000
273
272
274 celeryd.concurrency = 2
273 celeryd.concurrency = 2
275 #celeryd.log.file = celeryd.log
274 #celeryd.log.file = celeryd.log
276 celeryd.log.level = debug
275 celeryd.log.level = debug
277 celeryd.max.tasks.per.child = 1
276 celeryd.max.tasks.per.child = 1
278
277
279 ## tasks will never be sent to the queue, but executed locally instead.
278 ## tasks will never be sent to the queue, but executed locally instead.
280 celery.always.eager = false
279 celery.always.eager = false
281
280
282 ####################################
281 ####################################
283 ### BEAKER CACHE ####
282 ### BEAKER CACHE ####
284 ####################################
283 ####################################
285 # default cache dir for templates. Putting this into a ramdisk
284 # default cache dir for templates. Putting this into a ramdisk
286 ## can boost performance, eg. %(here)s/data_ramdisk
285 ## can boost performance, eg. %(here)s/data_ramdisk
287 cache_dir = %(here)s/data
286 cache_dir = %(here)s/data
288
287
289 ## locking and default file storage for Beaker. Putting this into a ramdisk
288 ## locking and default file storage for Beaker. Putting this into a ramdisk
290 ## can boost performance, eg. %(here)s/data_ramdisk/cache/beaker_data
289 ## can boost performance, eg. %(here)s/data_ramdisk/cache/beaker_data
291 beaker.cache.data_dir = %(here)s/data/cache/beaker_data
290 beaker.cache.data_dir = %(here)s/data/cache/beaker_data
292 beaker.cache.lock_dir = %(here)s/data/cache/beaker_lock
291 beaker.cache.lock_dir = %(here)s/data/cache/beaker_lock
293
292
294 beaker.cache.regions = super_short_term, short_term, long_term, sql_cache_short, auth_plugins, repo_cache_long
293 beaker.cache.regions = super_short_term, short_term, long_term, sql_cache_short, auth_plugins, repo_cache_long
295
294
296 beaker.cache.super_short_term.type = memory
295 beaker.cache.super_short_term.type = memory
297 beaker.cache.super_short_term.expire = 10
296 beaker.cache.super_short_term.expire = 10
298 beaker.cache.super_short_term.key_length = 256
297 beaker.cache.super_short_term.key_length = 256
299
298
300 beaker.cache.short_term.type = memory
299 beaker.cache.short_term.type = memory
301 beaker.cache.short_term.expire = 60
300 beaker.cache.short_term.expire = 60
302 beaker.cache.short_term.key_length = 256
301 beaker.cache.short_term.key_length = 256
303
302
304 beaker.cache.long_term.type = memory
303 beaker.cache.long_term.type = memory
305 beaker.cache.long_term.expire = 36000
304 beaker.cache.long_term.expire = 36000
306 beaker.cache.long_term.key_length = 256
305 beaker.cache.long_term.key_length = 256
307
306
308 beaker.cache.sql_cache_short.type = memory
307 beaker.cache.sql_cache_short.type = memory
309 beaker.cache.sql_cache_short.expire = 10
308 beaker.cache.sql_cache_short.expire = 10
310 beaker.cache.sql_cache_short.key_length = 256
309 beaker.cache.sql_cache_short.key_length = 256
311
310
312 ## default is memory cache, configure only if required
311 ## default is memory cache, configure only if required
313 ## using multi-node or multi-worker setup
312 ## using multi-node or multi-worker setup
314 #beaker.cache.auth_plugins.type = ext:database
313 #beaker.cache.auth_plugins.type = ext:database
315 #beaker.cache.auth_plugins.lock_dir = %(here)s/data/cache/auth_plugin_lock
314 #beaker.cache.auth_plugins.lock_dir = %(here)s/data/cache/auth_plugin_lock
316 #beaker.cache.auth_plugins.url = postgresql://postgres:secret@localhost/rhodecode
315 #beaker.cache.auth_plugins.url = postgresql://postgres:secret@localhost/rhodecode
317 #beaker.cache.auth_plugins.url = mysql://root:secret@127.0.0.1/rhodecode
316 #beaker.cache.auth_plugins.url = mysql://root:secret@127.0.0.1/rhodecode
318 #beaker.cache.auth_plugins.sa.pool_recycle = 3600
317 #beaker.cache.auth_plugins.sa.pool_recycle = 3600
319 #beaker.cache.auth_plugins.sa.pool_size = 10
318 #beaker.cache.auth_plugins.sa.pool_size = 10
320 #beaker.cache.auth_plugins.sa.max_overflow = 0
319 #beaker.cache.auth_plugins.sa.max_overflow = 0
321
320
322 beaker.cache.repo_cache_long.type = memorylru_base
321 beaker.cache.repo_cache_long.type = memorylru_base
323 beaker.cache.repo_cache_long.max_items = 4096
322 beaker.cache.repo_cache_long.max_items = 4096
324 beaker.cache.repo_cache_long.expire = 2592000
323 beaker.cache.repo_cache_long.expire = 2592000
325
324
326 ## default is memorylru_base cache, configure only if required
325 ## default is memorylru_base cache, configure only if required
327 ## using multi-node or multi-worker setup
326 ## using multi-node or multi-worker setup
328 #beaker.cache.repo_cache_long.type = ext:memcached
327 #beaker.cache.repo_cache_long.type = ext:memcached
329 #beaker.cache.repo_cache_long.url = localhost:11211
328 #beaker.cache.repo_cache_long.url = localhost:11211
330 #beaker.cache.repo_cache_long.expire = 1209600
329 #beaker.cache.repo_cache_long.expire = 1209600
331 #beaker.cache.repo_cache_long.key_length = 256
330 #beaker.cache.repo_cache_long.key_length = 256
332
331
333 ####################################
332 ####################################
334 ### BEAKER SESSION ####
333 ### BEAKER SESSION ####
335 ####################################
334 ####################################
336
335
337 ## .session.type is type of storage options for the session, current allowed
336 ## .session.type is type of storage options for the session, current allowed
338 ## types are file, ext:memcached, ext:database, and memory (default).
337 ## types are file, ext:memcached, ext:database, and memory (default).
339 beaker.session.type = file
338 beaker.session.type = file
340 beaker.session.data_dir = %(here)s/data/sessions/data
339 beaker.session.data_dir = %(here)s/data/sessions/data
341
340
342 ## db based session, fast, and allows easy management over logged in users
341 ## db based session, fast, and allows easy management over logged in users
343 #beaker.session.type = ext:database
342 #beaker.session.type = ext:database
344 #beaker.session.table_name = db_session
343 #beaker.session.table_name = db_session
345 #beaker.session.sa.url = postgresql://postgres:secret@localhost/rhodecode
344 #beaker.session.sa.url = postgresql://postgres:secret@localhost/rhodecode
346 #beaker.session.sa.url = mysql://root:secret@127.0.0.1/rhodecode
345 #beaker.session.sa.url = mysql://root:secret@127.0.0.1/rhodecode
347 #beaker.session.sa.pool_recycle = 3600
346 #beaker.session.sa.pool_recycle = 3600
348 #beaker.session.sa.echo = false
347 #beaker.session.sa.echo = false
349
348
350 beaker.session.key = rhodecode
349 beaker.session.key = rhodecode
351 beaker.session.secret = production-rc-uytcxaz
350 beaker.session.secret = production-rc-uytcxaz
352 beaker.session.lock_dir = %(here)s/data/sessions/lock
351 beaker.session.lock_dir = %(here)s/data/sessions/lock
353
352
354 ## Secure encrypted cookie. Requires AES and AES python libraries
353 ## Secure encrypted cookie. Requires AES and AES python libraries
355 ## you must disable beaker.session.secret to use this
354 ## you must disable beaker.session.secret to use this
356 #beaker.session.encrypt_key = key_for_encryption
355 #beaker.session.encrypt_key = key_for_encryption
357 #beaker.session.validate_key = validation_key
356 #beaker.session.validate_key = validation_key
358
357
359 ## sets session as invalid(also logging out user) if it haven not been
358 ## sets session as invalid(also logging out user) if it haven not been
360 ## accessed for given amount of time in seconds
359 ## accessed for given amount of time in seconds
361 beaker.session.timeout = 2592000
360 beaker.session.timeout = 2592000
362 beaker.session.httponly = true
361 beaker.session.httponly = true
363 ## Path to use for the cookie. Set to prefix if you use prefix middleware
362 ## Path to use for the cookie. Set to prefix if you use prefix middleware
364 #beaker.session.cookie_path = /custom_prefix
363 #beaker.session.cookie_path = /custom_prefix
365
364
366 ## uncomment for https secure cookie
365 ## uncomment for https secure cookie
367 beaker.session.secure = false
366 beaker.session.secure = false
368
367
369 ## auto save the session to not to use .save()
368 ## auto save the session to not to use .save()
370 beaker.session.auto = false
369 beaker.session.auto = false
371
370
372 ## default cookie expiration time in seconds, set to `true` to set expire
371 ## default cookie expiration time in seconds, set to `true` to set expire
373 ## at browser close
372 ## at browser close
374 #beaker.session.cookie_expires = 3600
373 #beaker.session.cookie_expires = 3600
375
374
376 ###################################
375 ###################################
377 ## SEARCH INDEXING CONFIGURATION ##
376 ## SEARCH INDEXING CONFIGURATION ##
378 ###################################
377 ###################################
379 ## Full text search indexer is available in rhodecode-tools under
378 ## Full text search indexer is available in rhodecode-tools under
380 ## `rhodecode-tools index` command
379 ## `rhodecode-tools index` command
381
380
382 ## WHOOSH Backend, doesn't require additional services to run
381 ## WHOOSH Backend, doesn't require additional services to run
383 ## it works good with few dozen repos
382 ## it works good with few dozen repos
384 search.module = rhodecode.lib.index.whoosh
383 search.module = rhodecode.lib.index.whoosh
385 search.location = %(here)s/data/index
384 search.location = %(here)s/data/index
386
385
387 ########################################
386 ########################################
388 ### CHANNELSTREAM CONFIG ####
387 ### CHANNELSTREAM CONFIG ####
389 ########################################
388 ########################################
390 ## channelstream enables persistent connections and live notification
389 ## channelstream enables persistent connections and live notification
391 ## in the system. It's also used by the chat system
390 ## in the system. It's also used by the chat system
392 channelstream.enabled = false
391 channelstream.enabled = false
393
392
394 ## server address for channelstream server on the backend
393 ## server address for channelstream server on the backend
395 channelstream.server = 127.0.0.1:9800
394 channelstream.server = 127.0.0.1:9800
396
395
397 ## location of the channelstream server from outside world
396 ## location of the channelstream server from outside world
398 ## use ws:// for http or wss:// for https. This address needs to be handled
397 ## use ws:// for http or wss:// for https. This address needs to be handled
399 ## by external HTTP server such as Nginx or Apache
398 ## by external HTTP server such as Nginx or Apache
400 ## see nginx/apache configuration examples in our docs
399 ## see nginx/apache configuration examples in our docs
401 channelstream.ws_url = ws://rhodecode.yourserver.com/_channelstream
400 channelstream.ws_url = ws://rhodecode.yourserver.com/_channelstream
402 channelstream.secret = secret
401 channelstream.secret = secret
403 channelstream.history.location = %(here)s/channelstream_history
402 channelstream.history.location = %(here)s/channelstream_history
404
403
405 ## Internal application path that Javascript uses to connect into.
404 ## Internal application path that Javascript uses to connect into.
406 ## If you use proxy-prefix the prefix should be added before /_channelstream
405 ## If you use proxy-prefix the prefix should be added before /_channelstream
407 channelstream.proxy_path = /_channelstream
406 channelstream.proxy_path = /_channelstream
408
407
409
408
410 ###################################
409 ###################################
411 ## APPENLIGHT CONFIG ##
410 ## APPENLIGHT CONFIG ##
412 ###################################
411 ###################################
413
412
414 ## Appenlight is tailored to work with RhodeCode, see
413 ## Appenlight is tailored to work with RhodeCode, see
415 ## http://appenlight.com for details how to obtain an account
414 ## http://appenlight.com for details how to obtain an account
416
415
417 ## appenlight integration enabled
416 ## appenlight integration enabled
418 appenlight = false
417 appenlight = false
419
418
420 appenlight.server_url = https://api.appenlight.com
419 appenlight.server_url = https://api.appenlight.com
421 appenlight.api_key = YOUR_API_KEY
420 appenlight.api_key = YOUR_API_KEY
422 #appenlight.transport_config = https://api.appenlight.com?threaded=1&timeout=5
421 #appenlight.transport_config = https://api.appenlight.com?threaded=1&timeout=5
423
422
424 # used for JS client
423 # used for JS client
425 appenlight.api_public_key = YOUR_API_PUBLIC_KEY
424 appenlight.api_public_key = YOUR_API_PUBLIC_KEY
426
425
427 ## TWEAK AMOUNT OF INFO SENT HERE
426 ## TWEAK AMOUNT OF INFO SENT HERE
428
427
429 ## enables 404 error logging (default False)
428 ## enables 404 error logging (default False)
430 appenlight.report_404 = false
429 appenlight.report_404 = false
431
430
432 ## time in seconds after request is considered being slow (default 1)
431 ## time in seconds after request is considered being slow (default 1)
433 appenlight.slow_request_time = 1
432 appenlight.slow_request_time = 1
434
433
435 ## record slow requests in application
434 ## record slow requests in application
436 ## (needs to be enabled for slow datastore recording and time tracking)
435 ## (needs to be enabled for slow datastore recording and time tracking)
437 appenlight.slow_requests = true
436 appenlight.slow_requests = true
438
437
439 ## enable hooking to application loggers
438 ## enable hooking to application loggers
440 appenlight.logging = true
439 appenlight.logging = true
441
440
442 ## minimum log level for log capture
441 ## minimum log level for log capture
443 appenlight.logging.level = WARNING
442 appenlight.logging.level = WARNING
444
443
445 ## send logs only from erroneous/slow requests
444 ## send logs only from erroneous/slow requests
446 ## (saves API quota for intensive logging)
445 ## (saves API quota for intensive logging)
447 appenlight.logging_on_error = false
446 appenlight.logging_on_error = false
448
447
449 ## list of additonal keywords that should be grabbed from environ object
448 ## list of additonal keywords that should be grabbed from environ object
450 ## can be string with comma separated list of words in lowercase
449 ## can be string with comma separated list of words in lowercase
451 ## (by default client will always send following info:
450 ## (by default client will always send following info:
452 ## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that
451 ## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that
453 ## start with HTTP* this list be extended with additional keywords here
452 ## start with HTTP* this list be extended with additional keywords here
454 appenlight.environ_keys_whitelist =
453 appenlight.environ_keys_whitelist =
455
454
456 ## list of keywords that should be blanked from request object
455 ## list of keywords that should be blanked from request object
457 ## can be string with comma separated list of words in lowercase
456 ## can be string with comma separated list of words in lowercase
458 ## (by default client will always blank keys that contain following words
457 ## (by default client will always blank keys that contain following words
459 ## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf'
458 ## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf'
460 ## this list be extended with additional keywords set here
459 ## this list be extended with additional keywords set here
461 appenlight.request_keys_blacklist =
460 appenlight.request_keys_blacklist =
462
461
463 ## list of namespaces that should be ignores when gathering log entries
462 ## list of namespaces that should be ignores when gathering log entries
464 ## can be string with comma separated list of namespaces
463 ## can be string with comma separated list of namespaces
465 ## (by default the client ignores own entries: appenlight_client.client)
464 ## (by default the client ignores own entries: appenlight_client.client)
466 appenlight.log_namespace_blacklist =
465 appenlight.log_namespace_blacklist =
467
466
468
467
469 ################################################################################
468 ################################################################################
470 ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ##
469 ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ##
471 ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ##
470 ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ##
472 ## execute malicious code after an exception is raised. ##
471 ## execute malicious code after an exception is raised. ##
473 ################################################################################
472 ################################################################################
474 set debug = false
473 set debug = false
475
474
476
475
477 ###########################################
476 ###########################################
478 ### MAIN RHODECODE DATABASE CONFIG ###
477 ### MAIN RHODECODE DATABASE CONFIG ###
479 ###########################################
478 ###########################################
480 #sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db?timeout=30
479 #sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db?timeout=30
481 #sqlalchemy.db1.url = postgresql://postgres:qweqwe@localhost/rhodecode
480 #sqlalchemy.db1.url = postgresql://postgres:qweqwe@localhost/rhodecode
482 #sqlalchemy.db1.url = mysql://root:qweqwe@localhost/rhodecode
481 #sqlalchemy.db1.url = mysql://root:qweqwe@localhost/rhodecode
483 sqlalchemy.db1.url = postgresql://postgres:qweqwe@localhost/rhodecode
482 sqlalchemy.db1.url = postgresql://postgres:qweqwe@localhost/rhodecode
484
483
485 # see sqlalchemy docs for other advanced settings
484 # see sqlalchemy docs for other advanced settings
486
485
487 ## print the sql statements to output
486 ## print the sql statements to output
488 sqlalchemy.db1.echo = false
487 sqlalchemy.db1.echo = false
489 ## recycle the connections after this amount of seconds
488 ## recycle the connections after this amount of seconds
490 sqlalchemy.db1.pool_recycle = 3600
489 sqlalchemy.db1.pool_recycle = 3600
491 sqlalchemy.db1.convert_unicode = true
490 sqlalchemy.db1.convert_unicode = true
492
491
493 ## the number of connections to keep open inside the connection pool.
492 ## the number of connections to keep open inside the connection pool.
494 ## 0 indicates no limit
493 ## 0 indicates no limit
495 #sqlalchemy.db1.pool_size = 5
494 #sqlalchemy.db1.pool_size = 5
496
495
497 ## the number of connections to allow in connection pool "overflow", that is
496 ## the number of connections to allow in connection pool "overflow", that is
498 ## connections that can be opened above and beyond the pool_size setting,
497 ## connections that can be opened above and beyond the pool_size setting,
499 ## which defaults to five.
498 ## which defaults to five.
500 #sqlalchemy.db1.max_overflow = 10
499 #sqlalchemy.db1.max_overflow = 10
501
500
502
501
503 ##################
502 ##################
504 ### VCS CONFIG ###
503 ### VCS CONFIG ###
505 ##################
504 ##################
506 vcs.server.enable = true
505 vcs.server.enable = true
507 vcs.server = localhost:9900
506 vcs.server = localhost:9900
508
507
509 ## Web server connectivity protocol, responsible for web based VCS operatations
508 ## Web server connectivity protocol, responsible for web based VCS operatations
510 ## Available protocols are:
509 ## Available protocols are:
511 ## `http` - use http-rpc backend (default)
510 ## `http` - use http-rpc backend (default)
512 vcs.server.protocol = http
511 vcs.server.protocol = http
513
512
514 ## Push/Pull operations protocol, available options are:
513 ## Push/Pull operations protocol, available options are:
515 ## `http` - use http-rpc backend (default)
514 ## `http` - use http-rpc backend (default)
516 ##
515 ##
517 vcs.scm_app_implementation = http
516 vcs.scm_app_implementation = http
518
517
519 ## Push/Pull operations hooks protocol, available options are:
518 ## Push/Pull operations hooks protocol, available options are:
520 ## `http` - use http-rpc backend (default)
519 ## `http` - use http-rpc backend (default)
521 vcs.hooks.protocol = http
520 vcs.hooks.protocol = http
522
521
523 vcs.server.log_level = info
522 vcs.server.log_level = info
524 ## Start VCSServer with this instance as a subprocess, usefull for development
523 ## Start VCSServer with this instance as a subprocess, usefull for development
525 vcs.start_server = false
524 vcs.start_server = false
526
525
527 ## List of enabled VCS backends, available options are:
526 ## List of enabled VCS backends, available options are:
528 ## `hg` - mercurial
527 ## `hg` - mercurial
529 ## `git` - git
528 ## `git` - git
530 ## `svn` - subversion
529 ## `svn` - subversion
531 vcs.backends = hg, git, svn
530 vcs.backends = hg, git, svn
532
531
533 vcs.connection_timeout = 3600
532 vcs.connection_timeout = 3600
534 ## Compatibility version when creating SVN repositories. Defaults to newest version when commented out.
533 ## Compatibility version when creating SVN repositories. Defaults to newest version when commented out.
535 ## Available options are: pre-1.4-compatible, pre-1.5-compatible, pre-1.6-compatible, pre-1.8-compatible
534 ## Available options are: pre-1.4-compatible, pre-1.5-compatible, pre-1.6-compatible, pre-1.8-compatible
536 #vcs.svn.compatible_version = pre-1.8-compatible
535 #vcs.svn.compatible_version = pre-1.8-compatible
537
536
538
537
539 ############################################################
538 ############################################################
540 ### Subversion proxy support (mod_dav_svn) ###
539 ### Subversion proxy support (mod_dav_svn) ###
541 ### Maps RhodeCode repo groups into SVN paths for Apache ###
540 ### Maps RhodeCode repo groups into SVN paths for Apache ###
542 ############################################################
541 ############################################################
543 ## Enable or disable the config file generation.
542 ## Enable or disable the config file generation.
544 svn.proxy.generate_config = false
543 svn.proxy.generate_config = false
545 ## Generate config file with `SVNListParentPath` set to `On`.
544 ## Generate config file with `SVNListParentPath` set to `On`.
546 svn.proxy.list_parent_path = true
545 svn.proxy.list_parent_path = true
547 ## Set location and file name of generated config file.
546 ## Set location and file name of generated config file.
548 svn.proxy.config_file_path = %(here)s/mod_dav_svn.conf
547 svn.proxy.config_file_path = %(here)s/mod_dav_svn.conf
549 ## Used as a prefix to the `Location` block in the generated config file.
548 ## Used as a prefix to the `Location` block in the generated config file.
550 ## In most cases it should be set to `/`.
549 ## In most cases it should be set to `/`.
551 svn.proxy.location_root = /
550 svn.proxy.location_root = /
552 ## Command to reload the mod dav svn configuration on change.
551 ## Command to reload the mod dav svn configuration on change.
553 ## Example: `/etc/init.d/apache2 reload`
552 ## Example: `/etc/init.d/apache2 reload`
554 #svn.proxy.reload_cmd = /etc/init.d/apache2 reload
553 #svn.proxy.reload_cmd = /etc/init.d/apache2 reload
555 ## If the timeout expires before the reload command finishes, the command will
554 ## If the timeout expires before the reload command finishes, the command will
556 ## be killed. Setting it to zero means no timeout. Defaults to 10 seconds.
555 ## be killed. Setting it to zero means no timeout. Defaults to 10 seconds.
557 #svn.proxy.reload_timeout = 10
556 #svn.proxy.reload_timeout = 10
558
557
559 ## Dummy marker to add new entries after.
558 ## Dummy marker to add new entries after.
560 ## Add any custom entries below. Please don't remove.
559 ## Add any custom entries below. Please don't remove.
561 custom.conf = 1
560 custom.conf = 1
562
561
563
562
564 ################################
563 ################################
565 ### LOGGING CONFIGURATION ####
564 ### LOGGING CONFIGURATION ####
566 ################################
565 ################################
567 [loggers]
566 [loggers]
568 keys = root, routes, rhodecode, sqlalchemy, beaker, templates
567 keys = root, routes, rhodecode, sqlalchemy, beaker, templates
569
568
570 [handlers]
569 [handlers]
571 keys = console, console_sql
570 keys = console, console_sql
572
571
573 [formatters]
572 [formatters]
574 keys = generic, color_formatter, color_formatter_sql
573 keys = generic, color_formatter, color_formatter_sql
575
574
576 #############
575 #############
577 ## LOGGERS ##
576 ## LOGGERS ##
578 #############
577 #############
579 [logger_root]
578 [logger_root]
580 level = NOTSET
579 level = NOTSET
581 handlers = console
580 handlers = console
582
581
583 [logger_routes]
582 [logger_routes]
584 level = DEBUG
583 level = DEBUG
585 handlers =
584 handlers =
586 qualname = routes.middleware
585 qualname = routes.middleware
587 ## "level = DEBUG" logs the route matched and routing variables.
586 ## "level = DEBUG" logs the route matched and routing variables.
588 propagate = 1
587 propagate = 1
589
588
590 [logger_beaker]
589 [logger_beaker]
591 level = DEBUG
590 level = DEBUG
592 handlers =
591 handlers =
593 qualname = beaker.container
592 qualname = beaker.container
594 propagate = 1
593 propagate = 1
595
594
596 [logger_templates]
595 [logger_templates]
597 level = INFO
596 level = INFO
598 handlers =
597 handlers =
599 qualname = pylons.templating
598 qualname = pylons.templating
600 propagate = 1
599 propagate = 1
601
600
602 [logger_rhodecode]
601 [logger_rhodecode]
603 level = DEBUG
602 level = DEBUG
604 handlers =
603 handlers =
605 qualname = rhodecode
604 qualname = rhodecode
606 propagate = 1
605 propagate = 1
607
606
608 [logger_sqlalchemy]
607 [logger_sqlalchemy]
609 level = INFO
608 level = INFO
610 handlers = console_sql
609 handlers = console_sql
611 qualname = sqlalchemy.engine
610 qualname = sqlalchemy.engine
612 propagate = 0
611 propagate = 0
613
612
614 ##############
613 ##############
615 ## HANDLERS ##
614 ## HANDLERS ##
616 ##############
615 ##############
617
616
618 [handler_console]
617 [handler_console]
619 class = StreamHandler
618 class = StreamHandler
620 args = (sys.stderr, )
619 args = (sys.stderr, )
621 level = INFO
620 level = INFO
622 formatter = generic
621 formatter = generic
623
622
624 [handler_console_sql]
623 [handler_console_sql]
625 class = StreamHandler
624 class = StreamHandler
626 args = (sys.stderr, )
625 args = (sys.stderr, )
627 level = WARN
626 level = WARN
628 formatter = generic
627 formatter = generic
629
628
630 ################
629 ################
631 ## FORMATTERS ##
630 ## FORMATTERS ##
632 ################
631 ################
633
632
634 [formatter_generic]
633 [formatter_generic]
635 class = rhodecode.lib.logging_formatter.ExceptionAwareFormatter
634 class = rhodecode.lib.logging_formatter.ExceptionAwareFormatter
636 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
635 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
637 datefmt = %Y-%m-%d %H:%M:%S
636 datefmt = %Y-%m-%d %H:%M:%S
638
637
639 [formatter_color_formatter]
638 [formatter_color_formatter]
640 class = rhodecode.lib.logging_formatter.ColorFormatter
639 class = rhodecode.lib.logging_formatter.ColorFormatter
641 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
640 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
642 datefmt = %Y-%m-%d %H:%M:%S
641 datefmt = %Y-%m-%d %H:%M:%S
643
642
644 [formatter_color_formatter_sql]
643 [formatter_color_formatter_sql]
645 class = rhodecode.lib.logging_formatter.ColorFormatterSql
644 class = rhodecode.lib.logging_formatter.ColorFormatterSql
646 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
645 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
647 datefmt = %Y-%m-%d %H:%M:%S
646 datefmt = %Y-%m-%d %H:%M:%S
@@ -1,175 +1,179 b''
1 # -*- coding: utf-8 -*-
1 # -*- coding: utf-8 -*-
2
2
3 # Copyright (C) 2016-2017 RhodeCode GmbH
3 # Copyright (C) 2016-2017 RhodeCode GmbH
4 #
4 #
5 # This program is free software: you can redistribute it and/or modify
5 # This program is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU Affero General Public License, version 3
6 # it under the terms of the GNU Affero General Public License, version 3
7 # (only), as published by the Free Software Foundation.
7 # (only), as published by the Free Software Foundation.
8 #
8 #
9 # This program is distributed in the hope that it will be useful,
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
12 # GNU General Public License for more details.
13 #
13 #
14 # You should have received a copy of the GNU Affero General Public License
14 # You should have received a copy of the GNU Affero General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
16 #
16 #
17 # This program is dual-licensed. If you wish to learn more about the
17 # This program is dual-licensed. If you wish to learn more about the
18 # RhodeCode Enterprise Edition, including its added features, Support services,
18 # RhodeCode Enterprise Edition, including its added features, Support services,
19 # and proprietary license terms, please see https://rhodecode.com/licenses/
19 # and proprietary license terms, please see https://rhodecode.com/licenses/
20
20
21
21
22 from rhodecode.apps.admin.navigation import NavigationRegistry
22 from rhodecode.apps.admin.navigation import NavigationRegistry
23 from rhodecode.config.routing import ADMIN_PREFIX
23 from rhodecode.config.routing import ADMIN_PREFIX
24 from rhodecode.lib.utils2 import str2bool
24 from rhodecode.lib.utils2 import str2bool
25
25
26
26
27 def admin_routes(config):
27 def admin_routes(config):
28 """
28 """
29 Admin prefixed routes
29 Admin prefixed routes
30 """
30 """
31
31
32 config.add_route(
32 config.add_route(
33 name='admin_audit_logs',
33 name='admin_audit_logs',
34 pattern='/audit_logs')
34 pattern='/audit_logs')
35
35
36 config.add_route(
36 config.add_route(
37 name='pull_requests_global_0', # backward compat
37 name='pull_requests_global_0', # backward compat
38 pattern='/pull_requests/{pull_request_id:[0-9]+}')
38 pattern='/pull_requests/{pull_request_id:[0-9]+}')
39 config.add_route(
39 config.add_route(
40 name='pull_requests_global_1', # backward compat
40 name='pull_requests_global_1', # backward compat
41 pattern='/pull-requests/{pull_request_id:[0-9]+}')
41 pattern='/pull-requests/{pull_request_id:[0-9]+}')
42 config.add_route(
42 config.add_route(
43 name='pull_requests_global',
43 name='pull_requests_global',
44 pattern='/pull-request/{pull_request_id:[0-9]+}')
44 pattern='/pull-request/{pull_request_id:[0-9]+}')
45
45
46 config.add_route(
46 config.add_route(
47 name='admin_settings_open_source',
47 name='admin_settings_open_source',
48 pattern='/settings/open_source')
48 pattern='/settings/open_source')
49 config.add_route(
49 config.add_route(
50 name='admin_settings_vcs_svn_generate_cfg',
50 name='admin_settings_vcs_svn_generate_cfg',
51 pattern='/settings/vcs/svn_generate_cfg')
51 pattern='/settings/vcs/svn_generate_cfg')
52
52
53 config.add_route(
53 config.add_route(
54 name='admin_settings_system',
54 name='admin_settings_system',
55 pattern='/settings/system')
55 pattern='/settings/system')
56 config.add_route(
56 config.add_route(
57 name='admin_settings_system_update',
57 name='admin_settings_system_update',
58 pattern='/settings/system/updates')
58 pattern='/settings/system/updates')
59
59
60 config.add_route(
60 config.add_route(
61 name='admin_settings_sessions',
61 name='admin_settings_sessions',
62 pattern='/settings/sessions')
62 pattern='/settings/sessions')
63 config.add_route(
63 config.add_route(
64 name='admin_settings_sessions_cleanup',
64 name='admin_settings_sessions_cleanup',
65 pattern='/settings/sessions/cleanup')
65 pattern='/settings/sessions/cleanup')
66
66
67 config.add_route(
67 config.add_route(
68 name='admin_settings_process_management',
68 name='admin_settings_process_management',
69 pattern='/settings/process_management')
69 pattern='/settings/process_management')
70 config.add_route(
70 config.add_route(
71 name='admin_settings_process_management_signal',
71 name='admin_settings_process_management_signal',
72 pattern='/settings/process_management/signal')
72 pattern='/settings/process_management/signal')
73
73
74 # global permissions
74 # global permissions
75
75
76 config.add_route(
76 config.add_route(
77 name='admin_permissions_application',
77 name='admin_permissions_application',
78 pattern='/permissions/application')
78 pattern='/permissions/application')
79 config.add_route(
79 config.add_route(
80 name='admin_permissions_application_update',
80 name='admin_permissions_application_update',
81 pattern='/permissions/application/update')
81 pattern='/permissions/application/update')
82
82
83 config.add_route(
83 config.add_route(
84 name='admin_permissions_global',
84 name='admin_permissions_global',
85 pattern='/permissions/global')
85 pattern='/permissions/global')
86 config.add_route(
86 config.add_route(
87 name='admin_permissions_global_update',
87 name='admin_permissions_global_update',
88 pattern='/permissions/global/update')
88 pattern='/permissions/global/update')
89
89
90 config.add_route(
90 config.add_route(
91 name='admin_permissions_object',
91 name='admin_permissions_object',
92 pattern='/permissions/object')
92 pattern='/permissions/object')
93 config.add_route(
93 config.add_route(
94 name='admin_permissions_object_update',
94 name='admin_permissions_object_update',
95 pattern='/permissions/object/update')
95 pattern='/permissions/object/update')
96
96
97 config.add_route(
97 config.add_route(
98 name='admin_permissions_ips',
98 name='admin_permissions_ips',
99 pattern='/permissions/ips')
99 pattern='/permissions/ips')
100
100
101 config.add_route(
101 config.add_route(
102 name='admin_permissions_overview',
102 name='admin_permissions_overview',
103 pattern='/permissions/overview')
103 pattern='/permissions/overview')
104
104
105 config.add_route(
106 name='admin_permissions_auth_token_access',
107 pattern='/permissions/auth_token_access')
108
105 # users admin
109 # users admin
106 config.add_route(
110 config.add_route(
107 name='users',
111 name='users',
108 pattern='/users')
112 pattern='/users')
109
113
110 config.add_route(
114 config.add_route(
111 name='users_data',
115 name='users_data',
112 pattern='/users_data')
116 pattern='/users_data')
113
117
114 # user auth tokens
118 # user auth tokens
115 config.add_route(
119 config.add_route(
116 name='edit_user_auth_tokens',
120 name='edit_user_auth_tokens',
117 pattern='/users/{user_id:\d+}/edit/auth_tokens')
121 pattern='/users/{user_id:\d+}/edit/auth_tokens')
118 config.add_route(
122 config.add_route(
119 name='edit_user_auth_tokens_add',
123 name='edit_user_auth_tokens_add',
120 pattern='/users/{user_id:\d+}/edit/auth_tokens/new')
124 pattern='/users/{user_id:\d+}/edit/auth_tokens/new')
121 config.add_route(
125 config.add_route(
122 name='edit_user_auth_tokens_delete',
126 name='edit_user_auth_tokens_delete',
123 pattern='/users/{user_id:\d+}/edit/auth_tokens/delete')
127 pattern='/users/{user_id:\d+}/edit/auth_tokens/delete')
124
128
125 # user emails
129 # user emails
126 config.add_route(
130 config.add_route(
127 name='edit_user_emails',
131 name='edit_user_emails',
128 pattern='/users/{user_id:\d+}/edit/emails')
132 pattern='/users/{user_id:\d+}/edit/emails')
129 config.add_route(
133 config.add_route(
130 name='edit_user_emails_add',
134 name='edit_user_emails_add',
131 pattern='/users/{user_id:\d+}/edit/emails/new')
135 pattern='/users/{user_id:\d+}/edit/emails/new')
132 config.add_route(
136 config.add_route(
133 name='edit_user_emails_delete',
137 name='edit_user_emails_delete',
134 pattern='/users/{user_id:\d+}/edit/emails/delete')
138 pattern='/users/{user_id:\d+}/edit/emails/delete')
135
139
136 # user IPs
140 # user IPs
137 config.add_route(
141 config.add_route(
138 name='edit_user_ips',
142 name='edit_user_ips',
139 pattern='/users/{user_id:\d+}/edit/ips')
143 pattern='/users/{user_id:\d+}/edit/ips')
140 config.add_route(
144 config.add_route(
141 name='edit_user_ips_add',
145 name='edit_user_ips_add',
142 pattern='/users/{user_id:\d+}/edit/ips/new')
146 pattern='/users/{user_id:\d+}/edit/ips/new')
143 config.add_route(
147 config.add_route(
144 name='edit_user_ips_delete',
148 name='edit_user_ips_delete',
145 pattern='/users/{user_id:\d+}/edit/ips/delete')
149 pattern='/users/{user_id:\d+}/edit/ips/delete')
146
150
147 # user groups management
151 # user groups management
148 config.add_route(
152 config.add_route(
149 name='edit_user_groups_management',
153 name='edit_user_groups_management',
150 pattern='/users/{user_id:\d+}/edit/groups_management')
154 pattern='/users/{user_id:\d+}/edit/groups_management')
151
155
152 config.add_route(
156 config.add_route(
153 name='edit_user_groups_management_updates',
157 name='edit_user_groups_management_updates',
154 pattern='/users/{user_id:\d+}/edit/edit_user_groups_management/updates')
158 pattern='/users/{user_id:\d+}/edit/edit_user_groups_management/updates')
155
159
156 # user audit logs
160 # user audit logs
157 config.add_route(
161 config.add_route(
158 name='edit_user_audit_logs',
162 name='edit_user_audit_logs',
159 pattern='/users/{user_id:\d+}/edit/audit')
163 pattern='/users/{user_id:\d+}/edit/audit')
160
164
161
165
162 def includeme(config):
166 def includeme(config):
163 settings = config.get_settings()
167 settings = config.get_settings()
164
168
165 # Create admin navigation registry and add it to the pyramid registry.
169 # Create admin navigation registry and add it to the pyramid registry.
166 labs_active = str2bool(settings.get('labs_settings_active', False))
170 labs_active = str2bool(settings.get('labs_settings_active', False))
167 navigation_registry = NavigationRegistry(labs_active=labs_active)
171 navigation_registry = NavigationRegistry(labs_active=labs_active)
168 config.registry.registerUtility(navigation_registry)
172 config.registry.registerUtility(navigation_registry)
169
173
170 # main admin routes
174 # main admin routes
171 config.add_route(name='admin_home', pattern=ADMIN_PREFIX)
175 config.add_route(name='admin_home', pattern=ADMIN_PREFIX)
172 config.include(admin_routes, route_prefix=ADMIN_PREFIX)
176 config.include(admin_routes, route_prefix=ADMIN_PREFIX)
173
177
174 # Scan module for configuration decorators.
178 # Scan module for configuration decorators.
175 config.scan()
179 config.scan()
@@ -1,310 +1,369 b''
1 # -*- coding: utf-8 -*-
1 # -*- coding: utf-8 -*-
2
2
3 # Copyright (C) 2016-2017 RhodeCode GmbH
3 # Copyright (C) 2016-2017 RhodeCode GmbH
4 #
4 #
5 # This program is free software: you can redistribute it and/or modify
5 # This program is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU Affero General Public License, version 3
6 # it under the terms of the GNU Affero General Public License, version 3
7 # (only), as published by the Free Software Foundation.
7 # (only), as published by the Free Software Foundation.
8 #
8 #
9 # This program is distributed in the hope that it will be useful,
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
12 # GNU General Public License for more details.
13 #
13 #
14 # You should have received a copy of the GNU Affero General Public License
14 # You should have received a copy of the GNU Affero General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
16 #
16 #
17 # This program is dual-licensed. If you wish to learn more about the
17 # This program is dual-licensed. If you wish to learn more about the
18 # RhodeCode Enterprise Edition, including its added features, Support services,
18 # RhodeCode Enterprise Edition, including its added features, Support services,
19 # and proprietary license terms, please see https://rhodecode.com/licenses/
19 # and proprietary license terms, please see https://rhodecode.com/licenses/
20
20
21 import re
21 import logging
22 import logging
22 import formencode
23 import formencode
24 from pyramid.interfaces import IRoutesMapper
23
25
24 from pyramid.view import view_config
26 from pyramid.view import view_config
25 from pyramid.httpexceptions import HTTPFound
27 from pyramid.httpexceptions import HTTPFound
26 from pyramid.renderers import render
28 from pyramid.renderers import render
27 from pyramid.response import Response
29 from pyramid.response import Response
28
30
29 from rhodecode.apps._base import BaseAppView
31 from rhodecode.apps._base import BaseAppView
30
32
31 from rhodecode.lib import helpers as h
33 from rhodecode.lib import helpers as h
32 from rhodecode.lib.auth import (
34 from rhodecode.lib.auth import (
33 LoginRequired, HasPermissionAllDecorator, CSRFRequired)
35 LoginRequired, HasPermissionAllDecorator, CSRFRequired)
36 from rhodecode.lib.utils2 import aslist
34 from rhodecode.model.db import User, UserIpMap
37 from rhodecode.model.db import User, UserIpMap
35 from rhodecode.model.forms import (
38 from rhodecode.model.forms import (
36 ApplicationPermissionsForm, ObjectPermissionsForm, UserPermissionsForm)
39 ApplicationPermissionsForm, ObjectPermissionsForm, UserPermissionsForm)
37 from rhodecode.model.meta import Session
40 from rhodecode.model.meta import Session
38 from rhodecode.model.permission import PermissionModel
41 from rhodecode.model.permission import PermissionModel
39 from rhodecode.model.settings import SettingsModel
42 from rhodecode.model.settings import SettingsModel
40
43
41
44
42 log = logging.getLogger(__name__)
45 log = logging.getLogger(__name__)
43
46
44
47
45 class AdminPermissionsView(BaseAppView):
48 class AdminPermissionsView(BaseAppView):
46 def load_default_context(self):
49 def load_default_context(self):
47 c = self._get_local_tmpl_context()
50 c = self._get_local_tmpl_context()
48
51
49 self._register_global_c(c)
52 self._register_global_c(c)
50 PermissionModel().set_global_permission_choices(
53 PermissionModel().set_global_permission_choices(
51 c, gettext_translator=self.request.translate)
54 c, gettext_translator=self.request.translate)
52 return c
55 return c
53
56
54 @LoginRequired()
57 @LoginRequired()
55 @HasPermissionAllDecorator('hg.admin')
58 @HasPermissionAllDecorator('hg.admin')
56 @view_config(
59 @view_config(
57 route_name='admin_permissions_application', request_method='GET',
60 route_name='admin_permissions_application', request_method='GET',
58 renderer='rhodecode:templates/admin/permissions/permissions.mako')
61 renderer='rhodecode:templates/admin/permissions/permissions.mako')
59 def permissions_application(self):
62 def permissions_application(self):
60 c = self.load_default_context()
63 c = self.load_default_context()
61 c.active = 'application'
64 c.active = 'application'
62
65
63 c.user = User.get_default_user(refresh=True)
66 c.user = User.get_default_user(refresh=True)
64
67
65 app_settings = SettingsModel().get_all_settings()
68 app_settings = SettingsModel().get_all_settings()
66 defaults = {
69 defaults = {
67 'anonymous': c.user.active,
70 'anonymous': c.user.active,
68 'default_register_message': app_settings.get(
71 'default_register_message': app_settings.get(
69 'rhodecode_register_message')
72 'rhodecode_register_message')
70 }
73 }
71 defaults.update(c.user.get_default_perms())
74 defaults.update(c.user.get_default_perms())
72
75
73 data = render('rhodecode:templates/admin/permissions/permissions.mako',
76 data = render('rhodecode:templates/admin/permissions/permissions.mako',
74 self._get_template_context(c), self.request)
77 self._get_template_context(c), self.request)
75 html = formencode.htmlfill.render(
78 html = formencode.htmlfill.render(
76 data,
79 data,
77 defaults=defaults,
80 defaults=defaults,
78 encoding="UTF-8",
81 encoding="UTF-8",
79 force_defaults=False
82 force_defaults=False
80 )
83 )
81 return Response(html)
84 return Response(html)
82
85
83 @LoginRequired()
86 @LoginRequired()
84 @HasPermissionAllDecorator('hg.admin')
87 @HasPermissionAllDecorator('hg.admin')
85 @CSRFRequired()
88 @CSRFRequired()
86 @view_config(
89 @view_config(
87 route_name='admin_permissions_application_update', request_method='POST',
90 route_name='admin_permissions_application_update', request_method='POST',
88 renderer='rhodecode:templates/admin/permissions/permissions.mako')
91 renderer='rhodecode:templates/admin/permissions/permissions.mako')
89 def permissions_application_update(self):
92 def permissions_application_update(self):
90 _ = self.request.translate
93 _ = self.request.translate
91 c = self.load_default_context()
94 c = self.load_default_context()
92 c.active = 'application'
95 c.active = 'application'
93
96
94 _form = ApplicationPermissionsForm(
97 _form = ApplicationPermissionsForm(
95 [x[0] for x in c.register_choices],
98 [x[0] for x in c.register_choices],
96 [x[0] for x in c.password_reset_choices],
99 [x[0] for x in c.password_reset_choices],
97 [x[0] for x in c.extern_activate_choices])()
100 [x[0] for x in c.extern_activate_choices])()
98
101
99 try:
102 try:
100 form_result = _form.to_python(dict(self.request.POST))
103 form_result = _form.to_python(dict(self.request.POST))
101 form_result.update({'perm_user_name': User.DEFAULT_USER})
104 form_result.update({'perm_user_name': User.DEFAULT_USER})
102 PermissionModel().update_application_permissions(form_result)
105 PermissionModel().update_application_permissions(form_result)
103
106
104 settings = [
107 settings = [
105 ('register_message', 'default_register_message'),
108 ('register_message', 'default_register_message'),
106 ]
109 ]
107 for setting, form_key in settings:
110 for setting, form_key in settings:
108 sett = SettingsModel().create_or_update_setting(
111 sett = SettingsModel().create_or_update_setting(
109 setting, form_result[form_key])
112 setting, form_result[form_key])
110 Session().add(sett)
113 Session().add(sett)
111
114
112 Session().commit()
115 Session().commit()
113 h.flash(_('Application permissions updated successfully'),
116 h.flash(_('Application permissions updated successfully'),
114 category='success')
117 category='success')
115
118
116 except formencode.Invalid as errors:
119 except formencode.Invalid as errors:
117 defaults = errors.value
120 defaults = errors.value
118
121
119 data = render(
122 data = render(
120 'rhodecode:templates/admin/permissions/permissions.mako',
123 'rhodecode:templates/admin/permissions/permissions.mako',
121 self._get_template_context(c), self.request)
124 self._get_template_context(c), self.request)
122 html = formencode.htmlfill.render(
125 html = formencode.htmlfill.render(
123 data,
126 data,
124 defaults=defaults,
127 defaults=defaults,
125 errors=errors.error_dict or {},
128 errors=errors.error_dict or {},
126 prefix_error=False,
129 prefix_error=False,
127 encoding="UTF-8",
130 encoding="UTF-8",
128 force_defaults=False
131 force_defaults=False
129 )
132 )
130 return Response(html)
133 return Response(html)
131
134
132 except Exception:
135 except Exception:
133 log.exception("Exception during update of permissions")
136 log.exception("Exception during update of permissions")
134 h.flash(_('Error occurred during update of permissions'),
137 h.flash(_('Error occurred during update of permissions'),
135 category='error')
138 category='error')
136
139
137 raise HTTPFound(h.route_path('admin_permissions_application'))
140 raise HTTPFound(h.route_path('admin_permissions_application'))
138
141
139 @LoginRequired()
142 @LoginRequired()
140 @HasPermissionAllDecorator('hg.admin')
143 @HasPermissionAllDecorator('hg.admin')
141 @view_config(
144 @view_config(
142 route_name='admin_permissions_object', request_method='GET',
145 route_name='admin_permissions_object', request_method='GET',
143 renderer='rhodecode:templates/admin/permissions/permissions.mako')
146 renderer='rhodecode:templates/admin/permissions/permissions.mako')
144 def permissions_objects(self):
147 def permissions_objects(self):
145 c = self.load_default_context()
148 c = self.load_default_context()
146 c.active = 'objects'
149 c.active = 'objects'
147
150
148 c.user = User.get_default_user(refresh=True)
151 c.user = User.get_default_user(refresh=True)
149 defaults = {}
152 defaults = {}
150 defaults.update(c.user.get_default_perms())
153 defaults.update(c.user.get_default_perms())
151
154
152 data = render(
155 data = render(
153 'rhodecode:templates/admin/permissions/permissions.mako',
156 'rhodecode:templates/admin/permissions/permissions.mako',
154 self._get_template_context(c), self.request)
157 self._get_template_context(c), self.request)
155 html = formencode.htmlfill.render(
158 html = formencode.htmlfill.render(
156 data,
159 data,
157 defaults=defaults,
160 defaults=defaults,
158 encoding="UTF-8",
161 encoding="UTF-8",
159 force_defaults=False
162 force_defaults=False
160 )
163 )
161 return Response(html)
164 return Response(html)
162
165
163 @LoginRequired()
166 @LoginRequired()
164 @HasPermissionAllDecorator('hg.admin')
167 @HasPermissionAllDecorator('hg.admin')
165 @CSRFRequired()
168 @CSRFRequired()
166 @view_config(
169 @view_config(
167 route_name='admin_permissions_object_update', request_method='POST',
170 route_name='admin_permissions_object_update', request_method='POST',
168 renderer='rhodecode:templates/admin/permissions/permissions.mako')
171 renderer='rhodecode:templates/admin/permissions/permissions.mako')
169 def permissions_objects_update(self):
172 def permissions_objects_update(self):
170 _ = self.request.translate
173 _ = self.request.translate
171 c = self.load_default_context()
174 c = self.load_default_context()
172 c.active = 'objects'
175 c.active = 'objects'
173
176
174 _form = ObjectPermissionsForm(
177 _form = ObjectPermissionsForm(
175 [x[0] for x in c.repo_perms_choices],
178 [x[0] for x in c.repo_perms_choices],
176 [x[0] for x in c.group_perms_choices],
179 [x[0] for x in c.group_perms_choices],
177 [x[0] for x in c.user_group_perms_choices])()
180 [x[0] for x in c.user_group_perms_choices])()
178
181
179 try:
182 try:
180 form_result = _form.to_python(dict(self.request.POST))
183 form_result = _form.to_python(dict(self.request.POST))
181 form_result.update({'perm_user_name': User.DEFAULT_USER})
184 form_result.update({'perm_user_name': User.DEFAULT_USER})
182 PermissionModel().update_object_permissions(form_result)
185 PermissionModel().update_object_permissions(form_result)
183
186
184 Session().commit()
187 Session().commit()
185 h.flash(_('Object permissions updated successfully'),
188 h.flash(_('Object permissions updated successfully'),
186 category='success')
189 category='success')
187
190
188 except formencode.Invalid as errors:
191 except formencode.Invalid as errors:
189 defaults = errors.value
192 defaults = errors.value
190
193
191 data = render(
194 data = render(
192 'rhodecode:templates/admin/permissions/permissions.mako',
195 'rhodecode:templates/admin/permissions/permissions.mako',
193 self._get_template_context(c), self.request)
196 self._get_template_context(c), self.request)
194 html = formencode.htmlfill.render(
197 html = formencode.htmlfill.render(
195 data,
198 data,
196 defaults=defaults,
199 defaults=defaults,
197 errors=errors.error_dict or {},
200 errors=errors.error_dict or {},
198 prefix_error=False,
201 prefix_error=False,
199 encoding="UTF-8",
202 encoding="UTF-8",
200 force_defaults=False
203 force_defaults=False
201 )
204 )
202 return Response(html)
205 return Response(html)
203 except Exception:
206 except Exception:
204 log.exception("Exception during update of permissions")
207 log.exception("Exception during update of permissions")
205 h.flash(_('Error occurred during update of permissions'),
208 h.flash(_('Error occurred during update of permissions'),
206 category='error')
209 category='error')
207
210
208 raise HTTPFound(h.route_path('admin_permissions_object'))
211 raise HTTPFound(h.route_path('admin_permissions_object'))
209
212
210 @LoginRequired()
213 @LoginRequired()
211 @HasPermissionAllDecorator('hg.admin')
214 @HasPermissionAllDecorator('hg.admin')
212 @view_config(
215 @view_config(
213 route_name='admin_permissions_global', request_method='GET',
216 route_name='admin_permissions_global', request_method='GET',
214 renderer='rhodecode:templates/admin/permissions/permissions.mako')
217 renderer='rhodecode:templates/admin/permissions/permissions.mako')
215 def permissions_global(self):
218 def permissions_global(self):
216 c = self.load_default_context()
219 c = self.load_default_context()
217 c.active = 'global'
220 c.active = 'global'
218
221
219 c.user = User.get_default_user(refresh=True)
222 c.user = User.get_default_user(refresh=True)
220 defaults = {}
223 defaults = {}
221 defaults.update(c.user.get_default_perms())
224 defaults.update(c.user.get_default_perms())
222
225
223 data = render(
226 data = render(
224 'rhodecode:templates/admin/permissions/permissions.mako',
227 'rhodecode:templates/admin/permissions/permissions.mako',
225 self._get_template_context(c), self.request)
228 self._get_template_context(c), self.request)
226 html = formencode.htmlfill.render(
229 html = formencode.htmlfill.render(
227 data,
230 data,
228 defaults=defaults,
231 defaults=defaults,
229 encoding="UTF-8",
232 encoding="UTF-8",
230 force_defaults=False
233 force_defaults=False
231 )
234 )
232 return Response(html)
235 return Response(html)
233
236
234 @LoginRequired()
237 @LoginRequired()
235 @HasPermissionAllDecorator('hg.admin')
238 @HasPermissionAllDecorator('hg.admin')
236 @CSRFRequired()
239 @CSRFRequired()
237 @view_config(
240 @view_config(
238 route_name='admin_permissions_global_update', request_method='POST',
241 route_name='admin_permissions_global_update', request_method='POST',
239 renderer='rhodecode:templates/admin/permissions/permissions.mako')
242 renderer='rhodecode:templates/admin/permissions/permissions.mako')
240 def permissions_global_update(self):
243 def permissions_global_update(self):
241 _ = self.request.translate
244 _ = self.request.translate
242 c = self.load_default_context()
245 c = self.load_default_context()
243 c.active = 'global'
246 c.active = 'global'
244
247
245 _form = UserPermissionsForm(
248 _form = UserPermissionsForm(
246 [x[0] for x in c.repo_create_choices],
249 [x[0] for x in c.repo_create_choices],
247 [x[0] for x in c.repo_create_on_write_choices],
250 [x[0] for x in c.repo_create_on_write_choices],
248 [x[0] for x in c.repo_group_create_choices],
251 [x[0] for x in c.repo_group_create_choices],
249 [x[0] for x in c.user_group_create_choices],
252 [x[0] for x in c.user_group_create_choices],
250 [x[0] for x in c.fork_choices],
253 [x[0] for x in c.fork_choices],
251 [x[0] for x in c.inherit_default_permission_choices])()
254 [x[0] for x in c.inherit_default_permission_choices])()
252
255
253 try:
256 try:
254 form_result = _form.to_python(dict(self.request.POST))
257 form_result = _form.to_python(dict(self.request.POST))
255 form_result.update({'perm_user_name': User.DEFAULT_USER})
258 form_result.update({'perm_user_name': User.DEFAULT_USER})
256 PermissionModel().update_user_permissions(form_result)
259 PermissionModel().update_user_permissions(form_result)
257
260
258 Session().commit()
261 Session().commit()
259 h.flash(_('Global permissions updated successfully'),
262 h.flash(_('Global permissions updated successfully'),
260 category='success')
263 category='success')
261
264
262 except formencode.Invalid as errors:
265 except formencode.Invalid as errors:
263 defaults = errors.value
266 defaults = errors.value
264
267
265 data = render(
268 data = render(
266 'rhodecode:templates/admin/permissions/permissions.mako',
269 'rhodecode:templates/admin/permissions/permissions.mako',
267 self._get_template_context(c), self.request)
270 self._get_template_context(c), self.request)
268 html = formencode.htmlfill.render(
271 html = formencode.htmlfill.render(
269 data,
272 data,
270 defaults=defaults,
273 defaults=defaults,
271 errors=errors.error_dict or {},
274 errors=errors.error_dict or {},
272 prefix_error=False,
275 prefix_error=False,
273 encoding="UTF-8",
276 encoding="UTF-8",
274 force_defaults=False
277 force_defaults=False
275 )
278 )
276 return Response(html)
279 return Response(html)
277 except Exception:
280 except Exception:
278 log.exception("Exception during update of permissions")
281 log.exception("Exception during update of permissions")
279 h.flash(_('Error occurred during update of permissions'),
282 h.flash(_('Error occurred during update of permissions'),
280 category='error')
283 category='error')
281
284
282 raise HTTPFound(h.route_path('admin_permissions_global'))
285 raise HTTPFound(h.route_path('admin_permissions_global'))
283
286
284 @LoginRequired()
287 @LoginRequired()
285 @HasPermissionAllDecorator('hg.admin')
288 @HasPermissionAllDecorator('hg.admin')
286 @view_config(
289 @view_config(
287 route_name='admin_permissions_ips', request_method='GET',
290 route_name='admin_permissions_ips', request_method='GET',
288 renderer='rhodecode:templates/admin/permissions/permissions.mako')
291 renderer='rhodecode:templates/admin/permissions/permissions.mako')
289 def permissions_ips(self):
292 def permissions_ips(self):
290 c = self.load_default_context()
293 c = self.load_default_context()
291 c.active = 'ips'
294 c.active = 'ips'
292
295
293 c.user = User.get_default_user(refresh=True)
296 c.user = User.get_default_user(refresh=True)
294 c.user_ip_map = (
297 c.user_ip_map = (
295 UserIpMap.query().filter(UserIpMap.user == c.user).all())
298 UserIpMap.query().filter(UserIpMap.user == c.user).all())
296
299
297 return self._get_template_context(c)
300 return self._get_template_context(c)
298
301
299 @LoginRequired()
302 @LoginRequired()
300 @HasPermissionAllDecorator('hg.admin')
303 @HasPermissionAllDecorator('hg.admin')
301 @view_config(
304 @view_config(
302 route_name='admin_permissions_overview', request_method='GET',
305 route_name='admin_permissions_overview', request_method='GET',
303 renderer='rhodecode:templates/admin/permissions/permissions.mako')
306 renderer='rhodecode:templates/admin/permissions/permissions.mako')
304 def permissions_overview(self):
307 def permissions_overview(self):
305 c = self.load_default_context()
308 c = self.load_default_context()
306 c.active = 'perms'
309 c.active = 'perms'
307
310
308 c.user = User.get_default_user(refresh=True)
311 c.user = User.get_default_user(refresh=True)
309 c.perm_user = c.user.AuthUser
312 c.perm_user = c.user.AuthUser
310 return self._get_template_context(c)
313 return self._get_template_context(c)
314
315 @LoginRequired()
316 @HasPermissionAllDecorator('hg.admin')
317 @view_config(
318 route_name='admin_permissions_auth_token_access', request_method='GET',
319 renderer='rhodecode:templates/admin/permissions/permissions.mako')
320 def auth_token_access(self):
321 from rhodecode import CONFIG
322
323 c = self.load_default_context()
324 c.active = 'auth_token_access'
325
326 c.user = User.get_default_user(refresh=True)
327 c.perm_user = c.user.AuthUser
328
329 mapper = self.request.registry.queryUtility(IRoutesMapper)
330 c.view_data = []
331
332 _argument_prog = re.compile('\{(.*?)\}|:\((.*)\)')
333 introspector = self.request.registry.introspector
334
335 view_intr = {}
336 for view_data in introspector.get_category('views'):
337 intr = view_data['introspectable']
338
339 if 'route_name' in intr and intr['attr']:
340 view_intr[intr['route_name']] = '{}.{}'.format(
341 str(intr['derived_callable'].func_name), intr['attr']
342 )
343
344 c.whitelist_key = 'api_access_controllers_whitelist'
345 c.whitelist_file = CONFIG.get('__file__')
346 whitelist_views = aslist(
347 CONFIG.get(c.whitelist_key), sep=',')
348
349 for route_info in mapper.get_routes():
350 if not route_info.name.startswith('__'):
351 routepath = route_info.pattern
352
353 def replace(matchobj):
354 if matchobj.group(1):
355 return "{%s}" % matchobj.group(1).split(':')[0]
356 else:
357 return "{%s}" % matchobj.group(2)
358
359 routepath = _argument_prog.sub(replace, routepath)
360
361 if not routepath.startswith('/'):
362 routepath = '/' + routepath
363
364 view_fqn = view_intr.get(route_info.name, 'NOT AVAILABLE')
365 active = view_fqn in whitelist_views
366 c.view_data.append((route_info.name, view_fqn, routepath, active))
367
368 c.whitelist_views = whitelist_views
369 return self._get_template_context(c)
@@ -1,213 +1,214 b''
1
1
2 /******************************************************************************
2 /******************************************************************************
3 * *
3 * *
4 * DO NOT CHANGE THIS FILE MANUALLY *
4 * DO NOT CHANGE THIS FILE MANUALLY *
5 * *
5 * *
6 * *
6 * *
7 * This file is automatically generated when the app starts up with *
7 * This file is automatically generated when the app starts up with *
8 * generate_js_files = true *
8 * generate_js_files = true *
9 * *
9 * *
10 * To add a route here pass jsroute=True to the route definition in the app *
10 * To add a route here pass jsroute=True to the route definition in the app *
11 * *
11 * *
12 ******************************************************************************/
12 ******************************************************************************/
13 function registerRCRoutes() {
13 function registerRCRoutes() {
14 // routes registration
14 // routes registration
15 pyroutes.register('new_repo', '/_admin/create_repository', []);
15 pyroutes.register('new_repo', '/_admin/create_repository', []);
16 pyroutes.register('edit_user', '/_admin/users/%(user_id)s/edit', ['user_id']);
16 pyroutes.register('edit_user', '/_admin/users/%(user_id)s/edit', ['user_id']);
17 pyroutes.register('edit_user_group_members', '/_admin/user_groups/%(user_group_id)s/edit/members', ['user_group_id']);
17 pyroutes.register('edit_user_group_members', '/_admin/user_groups/%(user_group_id)s/edit/members', ['user_group_id']);
18 pyroutes.register('changeset_home', '/%(repo_name)s/changeset/%(revision)s', ['repo_name', 'revision']);
18 pyroutes.register('changeset_home', '/%(repo_name)s/changeset/%(revision)s', ['repo_name', 'revision']);
19 pyroutes.register('changeset_comment', '/%(repo_name)s/changeset/%(revision)s/comment', ['repo_name', 'revision']);
19 pyroutes.register('changeset_comment', '/%(repo_name)s/changeset/%(revision)s/comment', ['repo_name', 'revision']);
20 pyroutes.register('changeset_comment_preview', '/%(repo_name)s/changeset/comment/preview', ['repo_name']);
20 pyroutes.register('changeset_comment_preview', '/%(repo_name)s/changeset/comment/preview', ['repo_name']);
21 pyroutes.register('changeset_comment_delete', '/%(repo_name)s/changeset/comment/%(comment_id)s/delete', ['repo_name', 'comment_id']);
21 pyroutes.register('changeset_comment_delete', '/%(repo_name)s/changeset/comment/%(comment_id)s/delete', ['repo_name', 'comment_id']);
22 pyroutes.register('changeset_info', '/%(repo_name)s/changeset_info/%(revision)s', ['repo_name', 'revision']);
22 pyroutes.register('changeset_info', '/%(repo_name)s/changeset_info/%(revision)s', ['repo_name', 'revision']);
23 pyroutes.register('compare_url', '/%(repo_name)s/compare/%(source_ref_type)s@%(source_ref)s...%(target_ref_type)s@%(target_ref)s', ['repo_name', 'source_ref_type', 'source_ref', 'target_ref_type', 'target_ref']);
23 pyroutes.register('compare_url', '/%(repo_name)s/compare/%(source_ref_type)s@%(source_ref)s...%(target_ref_type)s@%(target_ref)s', ['repo_name', 'source_ref_type', 'source_ref', 'target_ref_type', 'target_ref']);
24 pyroutes.register('pullrequest_home', '/%(repo_name)s/pull-request/new', ['repo_name']);
24 pyroutes.register('pullrequest_home', '/%(repo_name)s/pull-request/new', ['repo_name']);
25 pyroutes.register('pullrequest', '/%(repo_name)s/pull-request/new', ['repo_name']);
25 pyroutes.register('pullrequest', '/%(repo_name)s/pull-request/new', ['repo_name']);
26 pyroutes.register('pullrequest_repo_refs', '/%(repo_name)s/pull-request/refs/%(target_repo_name)s', ['repo_name', 'target_repo_name']);
26 pyroutes.register('pullrequest_repo_refs', '/%(repo_name)s/pull-request/refs/%(target_repo_name)s', ['repo_name', 'target_repo_name']);
27 pyroutes.register('pullrequest_repo_destinations', '/%(repo_name)s/pull-request/repo-destinations', ['repo_name']);
27 pyroutes.register('pullrequest_repo_destinations', '/%(repo_name)s/pull-request/repo-destinations', ['repo_name']);
28 pyroutes.register('pullrequest_show', '/%(repo_name)s/pull-request/%(pull_request_id)s', ['repo_name', 'pull_request_id']);
28 pyroutes.register('pullrequest_show', '/%(repo_name)s/pull-request/%(pull_request_id)s', ['repo_name', 'pull_request_id']);
29 pyroutes.register('pullrequest_update', '/%(repo_name)s/pull-request/%(pull_request_id)s', ['repo_name', 'pull_request_id']);
29 pyroutes.register('pullrequest_update', '/%(repo_name)s/pull-request/%(pull_request_id)s', ['repo_name', 'pull_request_id']);
30 pyroutes.register('pullrequest_comment', '/%(repo_name)s/pull-request-comment/%(pull_request_id)s', ['repo_name', 'pull_request_id']);
30 pyroutes.register('pullrequest_comment', '/%(repo_name)s/pull-request-comment/%(pull_request_id)s', ['repo_name', 'pull_request_id']);
31 pyroutes.register('pullrequest_comment_delete', '/%(repo_name)s/pull-request-comment/%(comment_id)s/delete', ['repo_name', 'comment_id']);
31 pyroutes.register('pullrequest_comment_delete', '/%(repo_name)s/pull-request-comment/%(comment_id)s/delete', ['repo_name', 'comment_id']);
32 pyroutes.register('favicon', '/favicon.ico', []);
32 pyroutes.register('favicon', '/favicon.ico', []);
33 pyroutes.register('robots', '/robots.txt', []);
33 pyroutes.register('robots', '/robots.txt', []);
34 pyroutes.register('auth_home', '/_admin/auth*traverse', []);
34 pyroutes.register('auth_home', '/_admin/auth*traverse', []);
35 pyroutes.register('global_integrations_new', '/_admin/integrations/new', []);
35 pyroutes.register('global_integrations_new', '/_admin/integrations/new', []);
36 pyroutes.register('global_integrations_home', '/_admin/integrations', []);
36 pyroutes.register('global_integrations_home', '/_admin/integrations', []);
37 pyroutes.register('global_integrations_list', '/_admin/integrations/%(integration)s', ['integration']);
37 pyroutes.register('global_integrations_list', '/_admin/integrations/%(integration)s', ['integration']);
38 pyroutes.register('global_integrations_create', '/_admin/integrations/%(integration)s/new', ['integration']);
38 pyroutes.register('global_integrations_create', '/_admin/integrations/%(integration)s/new', ['integration']);
39 pyroutes.register('global_integrations_edit', '/_admin/integrations/%(integration)s/%(integration_id)s', ['integration', 'integration_id']);
39 pyroutes.register('global_integrations_edit', '/_admin/integrations/%(integration)s/%(integration_id)s', ['integration', 'integration_id']);
40 pyroutes.register('repo_group_integrations_home', '/%(repo_group_name)s/settings/integrations', ['repo_group_name']);
40 pyroutes.register('repo_group_integrations_home', '/%(repo_group_name)s/settings/integrations', ['repo_group_name']);
41 pyroutes.register('repo_group_integrations_list', '/%(repo_group_name)s/settings/integrations/%(integration)s', ['repo_group_name', 'integration']);
41 pyroutes.register('repo_group_integrations_list', '/%(repo_group_name)s/settings/integrations/%(integration)s', ['repo_group_name', 'integration']);
42 pyroutes.register('repo_group_integrations_new', '/%(repo_group_name)s/settings/integrations/new', ['repo_group_name']);
42 pyroutes.register('repo_group_integrations_new', '/%(repo_group_name)s/settings/integrations/new', ['repo_group_name']);
43 pyroutes.register('repo_group_integrations_create', '/%(repo_group_name)s/settings/integrations/%(integration)s/new', ['repo_group_name', 'integration']);
43 pyroutes.register('repo_group_integrations_create', '/%(repo_group_name)s/settings/integrations/%(integration)s/new', ['repo_group_name', 'integration']);
44 pyroutes.register('repo_group_integrations_edit', '/%(repo_group_name)s/settings/integrations/%(integration)s/%(integration_id)s', ['repo_group_name', 'integration', 'integration_id']);
44 pyroutes.register('repo_group_integrations_edit', '/%(repo_group_name)s/settings/integrations/%(integration)s/%(integration_id)s', ['repo_group_name', 'integration', 'integration_id']);
45 pyroutes.register('repo_integrations_home', '/%(repo_name)s/settings/integrations', ['repo_name']);
45 pyroutes.register('repo_integrations_home', '/%(repo_name)s/settings/integrations', ['repo_name']);
46 pyroutes.register('repo_integrations_list', '/%(repo_name)s/settings/integrations/%(integration)s', ['repo_name', 'integration']);
46 pyroutes.register('repo_integrations_list', '/%(repo_name)s/settings/integrations/%(integration)s', ['repo_name', 'integration']);
47 pyroutes.register('repo_integrations_new', '/%(repo_name)s/settings/integrations/new', ['repo_name']);
47 pyroutes.register('repo_integrations_new', '/%(repo_name)s/settings/integrations/new', ['repo_name']);
48 pyroutes.register('repo_integrations_create', '/%(repo_name)s/settings/integrations/%(integration)s/new', ['repo_name', 'integration']);
48 pyroutes.register('repo_integrations_create', '/%(repo_name)s/settings/integrations/%(integration)s/new', ['repo_name', 'integration']);
49 pyroutes.register('repo_integrations_edit', '/%(repo_name)s/settings/integrations/%(integration)s/%(integration_id)s', ['repo_name', 'integration', 'integration_id']);
49 pyroutes.register('repo_integrations_edit', '/%(repo_name)s/settings/integrations/%(integration)s/%(integration_id)s', ['repo_name', 'integration', 'integration_id']);
50 pyroutes.register('ops_ping', '/_admin/ops/ping', []);
50 pyroutes.register('ops_ping', '/_admin/ops/ping', []);
51 pyroutes.register('ops_error_test', '/_admin/ops/error', []);
51 pyroutes.register('ops_error_test', '/_admin/ops/error', []);
52 pyroutes.register('ops_redirect_test', '/_admin/ops/redirect', []);
52 pyroutes.register('ops_redirect_test', '/_admin/ops/redirect', []);
53 pyroutes.register('admin_home', '/_admin', []);
53 pyroutes.register('admin_home', '/_admin', []);
54 pyroutes.register('admin_audit_logs', '/_admin/audit_logs', []);
54 pyroutes.register('admin_audit_logs', '/_admin/audit_logs', []);
55 pyroutes.register('pull_requests_global_0', '/_admin/pull_requests/%(pull_request_id)s', ['pull_request_id']);
55 pyroutes.register('pull_requests_global_0', '/_admin/pull_requests/%(pull_request_id)s', ['pull_request_id']);
56 pyroutes.register('pull_requests_global_1', '/_admin/pull-requests/%(pull_request_id)s', ['pull_request_id']);
56 pyroutes.register('pull_requests_global_1', '/_admin/pull-requests/%(pull_request_id)s', ['pull_request_id']);
57 pyroutes.register('pull_requests_global', '/_admin/pull-request/%(pull_request_id)s', ['pull_request_id']);
57 pyroutes.register('pull_requests_global', '/_admin/pull-request/%(pull_request_id)s', ['pull_request_id']);
58 pyroutes.register('admin_settings_open_source', '/_admin/settings/open_source', []);
58 pyroutes.register('admin_settings_open_source', '/_admin/settings/open_source', []);
59 pyroutes.register('admin_settings_vcs_svn_generate_cfg', '/_admin/settings/vcs/svn_generate_cfg', []);
59 pyroutes.register('admin_settings_vcs_svn_generate_cfg', '/_admin/settings/vcs/svn_generate_cfg', []);
60 pyroutes.register('admin_settings_system', '/_admin/settings/system', []);
60 pyroutes.register('admin_settings_system', '/_admin/settings/system', []);
61 pyroutes.register('admin_settings_system_update', '/_admin/settings/system/updates', []);
61 pyroutes.register('admin_settings_system_update', '/_admin/settings/system/updates', []);
62 pyroutes.register('admin_settings_sessions', '/_admin/settings/sessions', []);
62 pyroutes.register('admin_settings_sessions', '/_admin/settings/sessions', []);
63 pyroutes.register('admin_settings_sessions_cleanup', '/_admin/settings/sessions/cleanup', []);
63 pyroutes.register('admin_settings_sessions_cleanup', '/_admin/settings/sessions/cleanup', []);
64 pyroutes.register('admin_settings_process_management', '/_admin/settings/process_management', []);
64 pyroutes.register('admin_settings_process_management', '/_admin/settings/process_management', []);
65 pyroutes.register('admin_settings_process_management_signal', '/_admin/settings/process_management/signal', []);
65 pyroutes.register('admin_settings_process_management_signal', '/_admin/settings/process_management/signal', []);
66 pyroutes.register('admin_permissions_application', '/_admin/permissions/application', []);
66 pyroutes.register('admin_permissions_application', '/_admin/permissions/application', []);
67 pyroutes.register('admin_permissions_application_update', '/_admin/permissions/application/update', []);
67 pyroutes.register('admin_permissions_application_update', '/_admin/permissions/application/update', []);
68 pyroutes.register('admin_permissions_global', '/_admin/permissions/global', []);
68 pyroutes.register('admin_permissions_global', '/_admin/permissions/global', []);
69 pyroutes.register('admin_permissions_global_update', '/_admin/permissions/global/update', []);
69 pyroutes.register('admin_permissions_global_update', '/_admin/permissions/global/update', []);
70 pyroutes.register('admin_permissions_object', '/_admin/permissions/object', []);
70 pyroutes.register('admin_permissions_object', '/_admin/permissions/object', []);
71 pyroutes.register('admin_permissions_object_update', '/_admin/permissions/object/update', []);
71 pyroutes.register('admin_permissions_object_update', '/_admin/permissions/object/update', []);
72 pyroutes.register('admin_permissions_ips', '/_admin/permissions/ips', []);
72 pyroutes.register('admin_permissions_ips', '/_admin/permissions/ips', []);
73 pyroutes.register('admin_permissions_overview', '/_admin/permissions/overview', []);
73 pyroutes.register('admin_permissions_overview', '/_admin/permissions/overview', []);
74 pyroutes.register('admin_permissions_auth_token_access', '/_admin/permissions/auth_token_access', []);
74 pyroutes.register('users', '/_admin/users', []);
75 pyroutes.register('users', '/_admin/users', []);
75 pyroutes.register('users_data', '/_admin/users_data', []);
76 pyroutes.register('users_data', '/_admin/users_data', []);
76 pyroutes.register('edit_user_auth_tokens', '/_admin/users/%(user_id)s/edit/auth_tokens', ['user_id']);
77 pyroutes.register('edit_user_auth_tokens', '/_admin/users/%(user_id)s/edit/auth_tokens', ['user_id']);
77 pyroutes.register('edit_user_auth_tokens_add', '/_admin/users/%(user_id)s/edit/auth_tokens/new', ['user_id']);
78 pyroutes.register('edit_user_auth_tokens_add', '/_admin/users/%(user_id)s/edit/auth_tokens/new', ['user_id']);
78 pyroutes.register('edit_user_auth_tokens_delete', '/_admin/users/%(user_id)s/edit/auth_tokens/delete', ['user_id']);
79 pyroutes.register('edit_user_auth_tokens_delete', '/_admin/users/%(user_id)s/edit/auth_tokens/delete', ['user_id']);
79 pyroutes.register('edit_user_emails', '/_admin/users/%(user_id)s/edit/emails', ['user_id']);
80 pyroutes.register('edit_user_emails', '/_admin/users/%(user_id)s/edit/emails', ['user_id']);
80 pyroutes.register('edit_user_emails_add', '/_admin/users/%(user_id)s/edit/emails/new', ['user_id']);
81 pyroutes.register('edit_user_emails_add', '/_admin/users/%(user_id)s/edit/emails/new', ['user_id']);
81 pyroutes.register('edit_user_emails_delete', '/_admin/users/%(user_id)s/edit/emails/delete', ['user_id']);
82 pyroutes.register('edit_user_emails_delete', '/_admin/users/%(user_id)s/edit/emails/delete', ['user_id']);
82 pyroutes.register('edit_user_ips', '/_admin/users/%(user_id)s/edit/ips', ['user_id']);
83 pyroutes.register('edit_user_ips', '/_admin/users/%(user_id)s/edit/ips', ['user_id']);
83 pyroutes.register('edit_user_ips_add', '/_admin/users/%(user_id)s/edit/ips/new', ['user_id']);
84 pyroutes.register('edit_user_ips_add', '/_admin/users/%(user_id)s/edit/ips/new', ['user_id']);
84 pyroutes.register('edit_user_ips_delete', '/_admin/users/%(user_id)s/edit/ips/delete', ['user_id']);
85 pyroutes.register('edit_user_ips_delete', '/_admin/users/%(user_id)s/edit/ips/delete', ['user_id']);
85 pyroutes.register('edit_user_groups_management', '/_admin/users/%(user_id)s/edit/groups_management', ['user_id']);
86 pyroutes.register('edit_user_groups_management', '/_admin/users/%(user_id)s/edit/groups_management', ['user_id']);
86 pyroutes.register('edit_user_groups_management_updates', '/_admin/users/%(user_id)s/edit/edit_user_groups_management/updates', ['user_id']);
87 pyroutes.register('edit_user_groups_management_updates', '/_admin/users/%(user_id)s/edit/edit_user_groups_management/updates', ['user_id']);
87 pyroutes.register('edit_user_audit_logs', '/_admin/users/%(user_id)s/edit/audit', ['user_id']);
88 pyroutes.register('edit_user_audit_logs', '/_admin/users/%(user_id)s/edit/audit', ['user_id']);
88 pyroutes.register('channelstream_connect', '/_admin/channelstream/connect', []);
89 pyroutes.register('channelstream_connect', '/_admin/channelstream/connect', []);
89 pyroutes.register('channelstream_subscribe', '/_admin/channelstream/subscribe', []);
90 pyroutes.register('channelstream_subscribe', '/_admin/channelstream/subscribe', []);
90 pyroutes.register('channelstream_proxy', '/_channelstream', []);
91 pyroutes.register('channelstream_proxy', '/_channelstream', []);
91 pyroutes.register('login', '/_admin/login', []);
92 pyroutes.register('login', '/_admin/login', []);
92 pyroutes.register('logout', '/_admin/logout', []);
93 pyroutes.register('logout', '/_admin/logout', []);
93 pyroutes.register('register', '/_admin/register', []);
94 pyroutes.register('register', '/_admin/register', []);
94 pyroutes.register('reset_password', '/_admin/password_reset', []);
95 pyroutes.register('reset_password', '/_admin/password_reset', []);
95 pyroutes.register('reset_password_confirmation', '/_admin/password_reset_confirmation', []);
96 pyroutes.register('reset_password_confirmation', '/_admin/password_reset_confirmation', []);
96 pyroutes.register('home', '/', []);
97 pyroutes.register('home', '/', []);
97 pyroutes.register('user_autocomplete_data', '/_users', []);
98 pyroutes.register('user_autocomplete_data', '/_users', []);
98 pyroutes.register('user_group_autocomplete_data', '/_user_groups', []);
99 pyroutes.register('user_group_autocomplete_data', '/_user_groups', []);
99 pyroutes.register('repo_list_data', '/_repos', []);
100 pyroutes.register('repo_list_data', '/_repos', []);
100 pyroutes.register('goto_switcher_data', '/_goto_data', []);
101 pyroutes.register('goto_switcher_data', '/_goto_data', []);
101 pyroutes.register('journal', '/_admin/journal', []);
102 pyroutes.register('journal', '/_admin/journal', []);
102 pyroutes.register('journal_rss', '/_admin/journal/rss', []);
103 pyroutes.register('journal_rss', '/_admin/journal/rss', []);
103 pyroutes.register('journal_atom', '/_admin/journal/atom', []);
104 pyroutes.register('journal_atom', '/_admin/journal/atom', []);
104 pyroutes.register('journal_public', '/_admin/public_journal', []);
105 pyroutes.register('journal_public', '/_admin/public_journal', []);
105 pyroutes.register('journal_public_atom', '/_admin/public_journal/atom', []);
106 pyroutes.register('journal_public_atom', '/_admin/public_journal/atom', []);
106 pyroutes.register('journal_public_atom_old', '/_admin/public_journal_atom', []);
107 pyroutes.register('journal_public_atom_old', '/_admin/public_journal_atom', []);
107 pyroutes.register('journal_public_rss', '/_admin/public_journal/rss', []);
108 pyroutes.register('journal_public_rss', '/_admin/public_journal/rss', []);
108 pyroutes.register('journal_public_rss_old', '/_admin/public_journal_rss', []);
109 pyroutes.register('journal_public_rss_old', '/_admin/public_journal_rss', []);
109 pyroutes.register('toggle_following', '/_admin/toggle_following', []);
110 pyroutes.register('toggle_following', '/_admin/toggle_following', []);
110 pyroutes.register('repo_summary_explicit', '/%(repo_name)s/summary', ['repo_name']);
111 pyroutes.register('repo_summary_explicit', '/%(repo_name)s/summary', ['repo_name']);
111 pyroutes.register('repo_summary_commits', '/%(repo_name)s/summary-commits', ['repo_name']);
112 pyroutes.register('repo_summary_commits', '/%(repo_name)s/summary-commits', ['repo_name']);
112 pyroutes.register('repo_commit', '/%(repo_name)s/changeset/%(commit_id)s', ['repo_name', 'commit_id']);
113 pyroutes.register('repo_commit', '/%(repo_name)s/changeset/%(commit_id)s', ['repo_name', 'commit_id']);
113 pyroutes.register('repo_archivefile', '/%(repo_name)s/archive/%(fname)s', ['repo_name', 'fname']);
114 pyroutes.register('repo_archivefile', '/%(repo_name)s/archive/%(fname)s', ['repo_name', 'fname']);
114 pyroutes.register('repo_files_diff', '/%(repo_name)s/diff/%(f_path)s', ['repo_name', 'f_path']);
115 pyroutes.register('repo_files_diff', '/%(repo_name)s/diff/%(f_path)s', ['repo_name', 'f_path']);
115 pyroutes.register('repo_files_diff_2way_redirect', '/%(repo_name)s/diff-2way/%(f_path)s', ['repo_name', 'f_path']);
116 pyroutes.register('repo_files_diff_2way_redirect', '/%(repo_name)s/diff-2way/%(f_path)s', ['repo_name', 'f_path']);
116 pyroutes.register('repo_files', '/%(repo_name)s/files/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']);
117 pyroutes.register('repo_files', '/%(repo_name)s/files/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']);
117 pyroutes.register('repo_files:default_path', '/%(repo_name)s/files/%(commit_id)s/', ['repo_name', 'commit_id']);
118 pyroutes.register('repo_files:default_path', '/%(repo_name)s/files/%(commit_id)s/', ['repo_name', 'commit_id']);
118 pyroutes.register('repo_files:default_commit', '/%(repo_name)s/files', ['repo_name']);
119 pyroutes.register('repo_files:default_commit', '/%(repo_name)s/files', ['repo_name']);
119 pyroutes.register('repo_files:rendered', '/%(repo_name)s/render/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']);
120 pyroutes.register('repo_files:rendered', '/%(repo_name)s/render/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']);
120 pyroutes.register('repo_files:annotated', '/%(repo_name)s/annotate/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']);
121 pyroutes.register('repo_files:annotated', '/%(repo_name)s/annotate/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']);
121 pyroutes.register('repo_files:annotated_previous', '/%(repo_name)s/annotate-previous/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']);
122 pyroutes.register('repo_files:annotated_previous', '/%(repo_name)s/annotate-previous/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']);
122 pyroutes.register('repo_nodetree_full', '/%(repo_name)s/nodetree_full/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']);
123 pyroutes.register('repo_nodetree_full', '/%(repo_name)s/nodetree_full/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']);
123 pyroutes.register('repo_nodetree_full:default_path', '/%(repo_name)s/nodetree_full/%(commit_id)s/', ['repo_name', 'commit_id']);
124 pyroutes.register('repo_nodetree_full:default_path', '/%(repo_name)s/nodetree_full/%(commit_id)s/', ['repo_name', 'commit_id']);
124 pyroutes.register('repo_files_nodelist', '/%(repo_name)s/nodelist/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']);
125 pyroutes.register('repo_files_nodelist', '/%(repo_name)s/nodelist/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']);
125 pyroutes.register('repo_file_raw', '/%(repo_name)s/raw/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']);
126 pyroutes.register('repo_file_raw', '/%(repo_name)s/raw/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']);
126 pyroutes.register('repo_file_download', '/%(repo_name)s/download/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']);
127 pyroutes.register('repo_file_download', '/%(repo_name)s/download/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']);
127 pyroutes.register('repo_file_download:legacy', '/%(repo_name)s/rawfile/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']);
128 pyroutes.register('repo_file_download:legacy', '/%(repo_name)s/rawfile/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']);
128 pyroutes.register('repo_file_history', '/%(repo_name)s/history/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']);
129 pyroutes.register('repo_file_history', '/%(repo_name)s/history/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']);
129 pyroutes.register('repo_file_authors', '/%(repo_name)s/authors/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']);
130 pyroutes.register('repo_file_authors', '/%(repo_name)s/authors/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']);
130 pyroutes.register('repo_files_remove_file', '/%(repo_name)s/remove_file/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']);
131 pyroutes.register('repo_files_remove_file', '/%(repo_name)s/remove_file/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']);
131 pyroutes.register('repo_files_delete_file', '/%(repo_name)s/delete_file/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']);
132 pyroutes.register('repo_files_delete_file', '/%(repo_name)s/delete_file/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']);
132 pyroutes.register('repo_files_edit_file', '/%(repo_name)s/edit_file/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']);
133 pyroutes.register('repo_files_edit_file', '/%(repo_name)s/edit_file/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']);
133 pyroutes.register('repo_files_update_file', '/%(repo_name)s/update_file/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']);
134 pyroutes.register('repo_files_update_file', '/%(repo_name)s/update_file/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']);
134 pyroutes.register('repo_files_add_file', '/%(repo_name)s/add_file/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']);
135 pyroutes.register('repo_files_add_file', '/%(repo_name)s/add_file/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']);
135 pyroutes.register('repo_files_create_file', '/%(repo_name)s/create_file/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']);
136 pyroutes.register('repo_files_create_file', '/%(repo_name)s/create_file/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']);
136 pyroutes.register('repo_refs_data', '/%(repo_name)s/refs-data', ['repo_name']);
137 pyroutes.register('repo_refs_data', '/%(repo_name)s/refs-data', ['repo_name']);
137 pyroutes.register('repo_refs_changelog_data', '/%(repo_name)s/refs-data-changelog', ['repo_name']);
138 pyroutes.register('repo_refs_changelog_data', '/%(repo_name)s/refs-data-changelog', ['repo_name']);
138 pyroutes.register('repo_stats', '/%(repo_name)s/repo_stats/%(commit_id)s', ['repo_name', 'commit_id']);
139 pyroutes.register('repo_stats', '/%(repo_name)s/repo_stats/%(commit_id)s', ['repo_name', 'commit_id']);
139 pyroutes.register('repo_changelog', '/%(repo_name)s/changelog', ['repo_name']);
140 pyroutes.register('repo_changelog', '/%(repo_name)s/changelog', ['repo_name']);
140 pyroutes.register('repo_changelog_file', '/%(repo_name)s/changelog/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']);
141 pyroutes.register('repo_changelog_file', '/%(repo_name)s/changelog/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']);
141 pyroutes.register('repo_changelog_elements', '/%(repo_name)s/changelog_elements', ['repo_name']);
142 pyroutes.register('repo_changelog_elements', '/%(repo_name)s/changelog_elements', ['repo_name']);
142 pyroutes.register('tags_home', '/%(repo_name)s/tags', ['repo_name']);
143 pyroutes.register('tags_home', '/%(repo_name)s/tags', ['repo_name']);
143 pyroutes.register('branches_home', '/%(repo_name)s/branches', ['repo_name']);
144 pyroutes.register('branches_home', '/%(repo_name)s/branches', ['repo_name']);
144 pyroutes.register('bookmarks_home', '/%(repo_name)s/bookmarks', ['repo_name']);
145 pyroutes.register('bookmarks_home', '/%(repo_name)s/bookmarks', ['repo_name']);
145 pyroutes.register('pullrequest_show', '/%(repo_name)s/pull-request/%(pull_request_id)s', ['repo_name', 'pull_request_id']);
146 pyroutes.register('pullrequest_show', '/%(repo_name)s/pull-request/%(pull_request_id)s', ['repo_name', 'pull_request_id']);
146 pyroutes.register('pullrequest_show_all', '/%(repo_name)s/pull-request', ['repo_name']);
147 pyroutes.register('pullrequest_show_all', '/%(repo_name)s/pull-request', ['repo_name']);
147 pyroutes.register('pullrequest_show_all_data', '/%(repo_name)s/pull-request-data', ['repo_name']);
148 pyroutes.register('pullrequest_show_all_data', '/%(repo_name)s/pull-request-data', ['repo_name']);
148 pyroutes.register('changeset_home', '/%(repo_name)s/changeset/%(revision)s', ['repo_name', 'revision']);
149 pyroutes.register('changeset_home', '/%(repo_name)s/changeset/%(revision)s', ['repo_name', 'revision']);
149 pyroutes.register('changeset_children', '/%(repo_name)s/changeset_children/%(revision)s', ['repo_name', 'revision']);
150 pyroutes.register('changeset_children', '/%(repo_name)s/changeset_children/%(revision)s', ['repo_name', 'revision']);
150 pyroutes.register('changeset_parents', '/%(repo_name)s/changeset_parents/%(revision)s', ['repo_name', 'revision']);
151 pyroutes.register('changeset_parents', '/%(repo_name)s/changeset_parents/%(revision)s', ['repo_name', 'revision']);
151 pyroutes.register('edit_repo', '/%(repo_name)s/settings', ['repo_name']);
152 pyroutes.register('edit_repo', '/%(repo_name)s/settings', ['repo_name']);
152 pyroutes.register('edit_repo_advanced', '/%(repo_name)s/settings/advanced', ['repo_name']);
153 pyroutes.register('edit_repo_advanced', '/%(repo_name)s/settings/advanced', ['repo_name']);
153 pyroutes.register('edit_repo_advanced_delete', '/%(repo_name)s/settings/advanced/delete', ['repo_name']);
154 pyroutes.register('edit_repo_advanced_delete', '/%(repo_name)s/settings/advanced/delete', ['repo_name']);
154 pyroutes.register('edit_repo_advanced_locking', '/%(repo_name)s/settings/advanced/locking', ['repo_name']);
155 pyroutes.register('edit_repo_advanced_locking', '/%(repo_name)s/settings/advanced/locking', ['repo_name']);
155 pyroutes.register('edit_repo_advanced_journal', '/%(repo_name)s/settings/advanced/journal', ['repo_name']);
156 pyroutes.register('edit_repo_advanced_journal', '/%(repo_name)s/settings/advanced/journal', ['repo_name']);
156 pyroutes.register('edit_repo_advanced_fork', '/%(repo_name)s/settings/advanced/fork', ['repo_name']);
157 pyroutes.register('edit_repo_advanced_fork', '/%(repo_name)s/settings/advanced/fork', ['repo_name']);
157 pyroutes.register('edit_repo_caches', '/%(repo_name)s/settings/caches', ['repo_name']);
158 pyroutes.register('edit_repo_caches', '/%(repo_name)s/settings/caches', ['repo_name']);
158 pyroutes.register('edit_repo_perms', '/%(repo_name)s/settings/permissions', ['repo_name']);
159 pyroutes.register('edit_repo_perms', '/%(repo_name)s/settings/permissions', ['repo_name']);
159 pyroutes.register('repo_reviewers', '/%(repo_name)s/settings/review/rules', ['repo_name']);
160 pyroutes.register('repo_reviewers', '/%(repo_name)s/settings/review/rules', ['repo_name']);
160 pyroutes.register('repo_default_reviewers_data', '/%(repo_name)s/settings/review/default-reviewers', ['repo_name']);
161 pyroutes.register('repo_default_reviewers_data', '/%(repo_name)s/settings/review/default-reviewers', ['repo_name']);
161 pyroutes.register('repo_maintenance', '/%(repo_name)s/settings/maintenance', ['repo_name']);
162 pyroutes.register('repo_maintenance', '/%(repo_name)s/settings/maintenance', ['repo_name']);
162 pyroutes.register('repo_maintenance_execute', '/%(repo_name)s/settings/maintenance/execute', ['repo_name']);
163 pyroutes.register('repo_maintenance_execute', '/%(repo_name)s/settings/maintenance/execute', ['repo_name']);
163 pyroutes.register('strip', '/%(repo_name)s/settings/strip', ['repo_name']);
164 pyroutes.register('strip', '/%(repo_name)s/settings/strip', ['repo_name']);
164 pyroutes.register('strip_check', '/%(repo_name)s/settings/strip_check', ['repo_name']);
165 pyroutes.register('strip_check', '/%(repo_name)s/settings/strip_check', ['repo_name']);
165 pyroutes.register('strip_execute', '/%(repo_name)s/settings/strip_execute', ['repo_name']);
166 pyroutes.register('strip_execute', '/%(repo_name)s/settings/strip_execute', ['repo_name']);
166 pyroutes.register('rss_feed_home', '/%(repo_name)s/feed/rss', ['repo_name']);
167 pyroutes.register('rss_feed_home', '/%(repo_name)s/feed/rss', ['repo_name']);
167 pyroutes.register('atom_feed_home', '/%(repo_name)s/feed/atom', ['repo_name']);
168 pyroutes.register('atom_feed_home', '/%(repo_name)s/feed/atom', ['repo_name']);
168 pyroutes.register('repo_summary', '/%(repo_name)s', ['repo_name']);
169 pyroutes.register('repo_summary', '/%(repo_name)s', ['repo_name']);
169 pyroutes.register('repo_summary_slash', '/%(repo_name)s/', ['repo_name']);
170 pyroutes.register('repo_summary_slash', '/%(repo_name)s/', ['repo_name']);
170 pyroutes.register('repo_group_home', '/%(repo_group_name)s', ['repo_group_name']);
171 pyroutes.register('repo_group_home', '/%(repo_group_name)s', ['repo_group_name']);
171 pyroutes.register('repo_group_home_slash', '/%(repo_group_name)s/', ['repo_group_name']);
172 pyroutes.register('repo_group_home_slash', '/%(repo_group_name)s/', ['repo_group_name']);
172 pyroutes.register('search', '/_admin/search', []);
173 pyroutes.register('search', '/_admin/search', []);
173 pyroutes.register('search_repo', '/%(repo_name)s/search', ['repo_name']);
174 pyroutes.register('search_repo', '/%(repo_name)s/search', ['repo_name']);
174 pyroutes.register('user_profile', '/_profiles/%(username)s', ['username']);
175 pyroutes.register('user_profile', '/_profiles/%(username)s', ['username']);
175 pyroutes.register('my_account_profile', '/_admin/my_account/profile', []);
176 pyroutes.register('my_account_profile', '/_admin/my_account/profile', []);
176 pyroutes.register('my_account_edit', '/_admin/my_account/edit', []);
177 pyroutes.register('my_account_edit', '/_admin/my_account/edit', []);
177 pyroutes.register('my_account_update', '/_admin/my_account/update', []);
178 pyroutes.register('my_account_update', '/_admin/my_account/update', []);
178 pyroutes.register('my_account_password', '/_admin/my_account/password', []);
179 pyroutes.register('my_account_password', '/_admin/my_account/password', []);
179 pyroutes.register('my_account_password_update', '/_admin/my_account/password', []);
180 pyroutes.register('my_account_password_update', '/_admin/my_account/password/update', []);
180 pyroutes.register('my_account_auth_tokens', '/_admin/my_account/auth_tokens', []);
181 pyroutes.register('my_account_auth_tokens', '/_admin/my_account/auth_tokens', []);
181 pyroutes.register('my_account_auth_tokens_add', '/_admin/my_account/auth_tokens/new', []);
182 pyroutes.register('my_account_auth_tokens_add', '/_admin/my_account/auth_tokens/new', []);
182 pyroutes.register('my_account_auth_tokens_delete', '/_admin/my_account/auth_tokens/delete', []);
183 pyroutes.register('my_account_auth_tokens_delete', '/_admin/my_account/auth_tokens/delete', []);
183 pyroutes.register('my_account_emails', '/_admin/my_account/emails', []);
184 pyroutes.register('my_account_emails', '/_admin/my_account/emails', []);
184 pyroutes.register('my_account_emails_add', '/_admin/my_account/emails/new', []);
185 pyroutes.register('my_account_emails_add', '/_admin/my_account/emails/new', []);
185 pyroutes.register('my_account_emails_delete', '/_admin/my_account/emails/delete', []);
186 pyroutes.register('my_account_emails_delete', '/_admin/my_account/emails/delete', []);
186 pyroutes.register('my_account_repos', '/_admin/my_account/repos', []);
187 pyroutes.register('my_account_repos', '/_admin/my_account/repos', []);
187 pyroutes.register('my_account_watched', '/_admin/my_account/watched', []);
188 pyroutes.register('my_account_watched', '/_admin/my_account/watched', []);
188 pyroutes.register('my_account_perms', '/_admin/my_account/perms', []);
189 pyroutes.register('my_account_perms', '/_admin/my_account/perms', []);
189 pyroutes.register('my_account_notifications', '/_admin/my_account/notifications', []);
190 pyroutes.register('my_account_notifications', '/_admin/my_account/notifications', []);
190 pyroutes.register('my_account_notifications_toggle_visibility', '/_admin/my_account/toggle_visibility', []);
191 pyroutes.register('my_account_notifications_toggle_visibility', '/_admin/my_account/toggle_visibility', []);
191 pyroutes.register('my_account_pullrequests', '/_admin/my_account/pull_requests', []);
192 pyroutes.register('my_account_pullrequests', '/_admin/my_account/pull_requests', []);
192 pyroutes.register('my_account_pullrequests_data', '/_admin/my_account/pull_requests/data', []);
193 pyroutes.register('my_account_pullrequests_data', '/_admin/my_account/pull_requests/data', []);
193 pyroutes.register('notifications_show_all', '/_admin/notifications', []);
194 pyroutes.register('notifications_show_all', '/_admin/notifications', []);
194 pyroutes.register('notifications_mark_all_read', '/_admin/notifications/mark_all_read', []);
195 pyroutes.register('notifications_mark_all_read', '/_admin/notifications/mark_all_read', []);
195 pyroutes.register('notifications_show', '/_admin/notifications/%(notification_id)s', ['notification_id']);
196 pyroutes.register('notifications_show', '/_admin/notifications/%(notification_id)s', ['notification_id']);
196 pyroutes.register('notifications_update', '/_admin/notifications/%(notification_id)s/update', ['notification_id']);
197 pyroutes.register('notifications_update', '/_admin/notifications/%(notification_id)s/update', ['notification_id']);
197 pyroutes.register('notifications_delete', '/_admin/notifications/%(notification_id)s/delete', ['notification_id']);
198 pyroutes.register('notifications_delete', '/_admin/notifications/%(notification_id)s/delete', ['notification_id']);
198 pyroutes.register('my_account_notifications_test_channelstream', '/_admin/my_account/test_channelstream', []);
199 pyroutes.register('my_account_notifications_test_channelstream', '/_admin/my_account/test_channelstream', []);
199 pyroutes.register('gists_show', '/_admin/gists', []);
200 pyroutes.register('gists_show', '/_admin/gists', []);
200 pyroutes.register('gists_new', '/_admin/gists/new', []);
201 pyroutes.register('gists_new', '/_admin/gists/new', []);
201 pyroutes.register('gists_create', '/_admin/gists/create', []);
202 pyroutes.register('gists_create', '/_admin/gists/create', []);
202 pyroutes.register('gist_show', '/_admin/gists/%(gist_id)s', ['gist_id']);
203 pyroutes.register('gist_show', '/_admin/gists/%(gist_id)s', ['gist_id']);
203 pyroutes.register('gist_delete', '/_admin/gists/%(gist_id)s/delete', ['gist_id']);
204 pyroutes.register('gist_delete', '/_admin/gists/%(gist_id)s/delete', ['gist_id']);
204 pyroutes.register('gist_edit', '/_admin/gists/%(gist_id)s/edit', ['gist_id']);
205 pyroutes.register('gist_edit', '/_admin/gists/%(gist_id)s/edit', ['gist_id']);
205 pyroutes.register('gist_edit_check_revision', '/_admin/gists/%(gist_id)s/edit/check_revision', ['gist_id']);
206 pyroutes.register('gist_edit_check_revision', '/_admin/gists/%(gist_id)s/edit/check_revision', ['gist_id']);
206 pyroutes.register('gist_update', '/_admin/gists/%(gist_id)s/update', ['gist_id']);
207 pyroutes.register('gist_update', '/_admin/gists/%(gist_id)s/update', ['gist_id']);
207 pyroutes.register('gist_show_rev', '/_admin/gists/%(gist_id)s/%(revision)s', ['gist_id', 'revision']);
208 pyroutes.register('gist_show_rev', '/_admin/gists/%(gist_id)s/%(revision)s', ['gist_id', 'revision']);
208 pyroutes.register('gist_show_formatted', '/_admin/gists/%(gist_id)s/%(revision)s/%(format)s', ['gist_id', 'revision', 'format']);
209 pyroutes.register('gist_show_formatted', '/_admin/gists/%(gist_id)s/%(revision)s/%(format)s', ['gist_id', 'revision', 'format']);
209 pyroutes.register('gist_show_formatted_path', '/_admin/gists/%(gist_id)s/%(revision)s/%(format)s/%(f_path)s', ['gist_id', 'revision', 'format', 'f_path']);
210 pyroutes.register('gist_show_formatted_path', '/_admin/gists/%(gist_id)s/%(revision)s/%(format)s/%(f_path)s', ['gist_id', 'revision', 'format', 'f_path']);
210 pyroutes.register('debug_style_home', '/_admin/debug_style', []);
211 pyroutes.register('debug_style_home', '/_admin/debug_style', []);
211 pyroutes.register('debug_style_template', '/_admin/debug_style/t/%(t_path)s', ['t_path']);
212 pyroutes.register('debug_style_template', '/_admin/debug_style/t/%(t_path)s', ['t_path']);
212 pyroutes.register('apiv2', '/_admin/api', []);
213 pyroutes.register('apiv2', '/_admin/api', []);
213 }
214 }
@@ -1,56 +1,59 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 <%inherit file="/base/base.mako"/>
2 <%inherit file="/base/base.mako"/>
3
3
4 <%def name="title()">
4 <%def name="title()">
5 ${_('Permissions Administration')}
5 ${_('Permissions Administration')}
6 %if c.rhodecode_name:
6 %if c.rhodecode_name:
7 &middot; ${h.branding(c.rhodecode_name)}
7 &middot; ${h.branding(c.rhodecode_name)}
8 %endif
8 %endif
9 </%def>
9 </%def>
10
10
11 <%def name="breadcrumbs_links()">
11 <%def name="breadcrumbs_links()">
12 ${h.link_to(_('Admin'),h.route_path('admin_home'))}
12 ${h.link_to(_('Admin'),h.route_path('admin_home'))}
13 &raquo;
13 &raquo;
14 ${_('Permissions')}
14 ${_('Permissions')}
15 </%def>
15 </%def>
16
16
17 <%def name="menu_bar_nav()">
17 <%def name="menu_bar_nav()">
18 ${self.menu_items(active='admin')}
18 ${self.menu_items(active='admin')}
19 </%def>
19 </%def>
20
20
21
21
22 <%def name="main()">
22 <%def name="main()">
23 <div class="box">
23 <div class="box">
24 <div class="title">
24 <div class="title">
25 ${self.breadcrumbs()}
25 ${self.breadcrumbs()}
26 </div>
26 </div>
27
27
28 <div class="sidebar-col-wrapper scw-small">
28 <div class="sidebar-col-wrapper scw-small">
29 ##main
29 ##main
30 <div class="sidebar">
30 <div class="sidebar">
31 <ul class="nav nav-pills nav-stacked">
31 <ul class="nav nav-pills nav-stacked">
32 <li class="${'active' if c.active=='application' else ''}">
32 <li class="${'active' if c.active=='application' else ''}">
33 <a href="${h.route_path('admin_permissions_application')}">${_('Application')}</a>
33 <a href="${h.route_path('admin_permissions_application')}">${_('Application')}</a>
34 </li>
34 </li>
35 <li class="${'active' if c.active=='global' else ''}">
35 <li class="${'active' if c.active=='global' else ''}">
36 <a href="${h.route_path('admin_permissions_global')}">${_('Global')}</a>
36 <a href="${h.route_path('admin_permissions_global')}">${_('Global')}</a>
37 </li>
37 </li>
38 <li class="${'active' if c.active=='objects' else ''}">
38 <li class="${'active' if c.active=='objects' else ''}">
39 <a href="${h.route_path('admin_permissions_object')}">${_('Object')}</a>
39 <a href="${h.route_path('admin_permissions_object')}">${_('Object')}</a>
40 </li>
40 </li>
41 <li class="${'active' if c.active=='ips' else ''}">
41 <li class="${'active' if c.active=='ips' else ''}">
42 <a href="${h.route_path('admin_permissions_ips')}">${_('IP Whitelist')}</a>
42 <a href="${h.route_path('admin_permissions_ips')}">${_('IP Whitelist')}</a>
43 </li>
43 </li>
44 <li class="${'active' if c.active=='auth_token_access' else ''}">
45 <a href="${h.route_path('admin_permissions_auth_token_access')}">${_('AuthToken Access')}</a>
46 </li>
44 <li class="${'active' if c.active=='perms' else ''}">
47 <li class="${'active' if c.active=='perms' else ''}">
45 <a href="${h.route_path('admin_permissions_overview')}">${_('Overview')}</a>
48 <a href="${h.route_path('admin_permissions_overview')}">${_('Overview')}</a>
46 </li>
49 </li>
47 </ul>
50 </ul>
48 </div>
51 </div>
49
52
50 <div class="main-content-full-width">
53 <div class="main-content-full-width">
51 <%include file="/admin/permissions/permissions_${c.active}.mako"/>
54 <%include file="/admin/permissions/permissions_${c.active}.mako"/>
52 </div>
55 </div>
53 </div>
56 </div>
54 </div>
57 </div>
55
58
56 </%def>
59 </%def>
General Comments 0
You need to be logged in to leave comments. Login now