##// END OF EJS Templates
Add ini option to controll custom advanced hooks settings
marcink -
r4045:9b4ba12e default
parent child Browse files
Show More
@@ -171,7 +171,7 b' default_encoding = utf8'
171 171
172 172 #clone_uri = {scheme}://{user}{pass}{netloc}{path}
173 173
174 ## issue tracker RhodeCode (leave blank to disable, absent for default)
174 ## issue tracker for RhodeCode (leave blank to disable, absent for default)
175 175 #bugtracker = http://bitbucket.org/marcinkuzminski/rhodecode/issues
176 176
177 177 ## issue tracking mapping for commits messages
@@ -219,8 +219,13 b' auth_ret_code ='
219 219 ## codes don't break the transactions while 4XX codes do
220 220 lock_ret_code = 423
221 221
222 ## allows to change the repository location in settings page
222 223 allow_repo_location_change = True
223 224
225 ## allows to setup custom hooks in settings page
226 allow_custom_hooks_settings = True
227
228
224 229 ####################################
225 230 ### CELERY CONFIG ####
226 231 ####################################
@@ -219,8 +219,13 b' auth_ret_code ='
219 219 ## codes don't break the transactions while 4XX codes do
220 220 lock_ret_code = 423
221 221
222 ## allows to change the repository location in settings page
222 223 allow_repo_location_change = True
223 224
225 ## allows to setup custom hooks in settings page
226 allow_custom_hooks_settings = True
227
228
224 229 ####################################
225 230 ### CELERY CONFIG ####
226 231 ####################################
@@ -227,9 +227,12 b' auth_ret_code ='
227 227 <%text>## codes don't break the transactions while 4XX codes do</%text>
228 228 lock_ret_code = 423
229 229
230 <%text>## allow chaning the repository store location from web interface</%text>
230 <%text>## allows to change the repository location in settings page</%text>
231 231 allow_repo_location_change = True
232 232
233 <%text>## allows to setup custom hooks in settings page</%text>
234 allow_custom_hooks_settings = True
235
233 236 <%text>
234 237 ####################################
235 238 ### CELERY CONFIG ####
@@ -219,8 +219,13 b' auth_ret_code ='
219 219 ## codes don't break the transactions while 4XX codes do
220 220 lock_ret_code = 423
221 221
222 ## allows to change the repository location in settings page
222 223 allow_repo_location_change = True
223 224
225 ## allows to setup custom hooks in settings page
226 allow_custom_hooks_settings = True
227
228
224 229 ####################################
225 230 ### CELERY CONFIG ####
226 231 ####################################
@@ -309,6 +309,7 b' class SettingsController(BaseController)'
309 309 'application settings'), category='error')
310 310
311 311 if setting_id == 'hooks':
312 if c.visual.allow_custom_hooks_settings:
312 313 ui_key = request.POST.get('new_hook_ui_key')
313 314 ui_value = request.POST.get('new_hook_ui_value')
314 315 try:
@@ -279,6 +279,7 b' class BaseController(WSGIController):'
279 279 ## INI stored
280 280 self.cut_off_limit = int(config.get('cut_off_limit'))
281 281 c.visual.allow_repo_location_change = str2bool(config.get('allow_repo_location_change', True))
282 c.visual.allow_custom_hooks_settings = str2bool(config.get('allow_custom_hooks_settings', True))
282 283
283 284 c.repo_name = get_repo_slug(request) # can be empty
284 285 c.backends = BACKENDS.keys()
@@ -36,7 +36,7 b''
36 36 % endfor
37 37 </div>
38 38 </div>
39
39 % if c.visual.allow_custom_hooks_settings:
40 40 <h3>${_('Custom hooks')}</h3>
41 41 ${h.form(url('admin_setting', setting_id='hooks'),method='put')}
42 42 <div class="form">
@@ -75,6 +75,7 b''
75 75 </div>
76 76 </div>
77 77 ${h.end_form()}
78 % endif
78 79 </div>
79 80 <script type="text/javascript">
80 81 function ajaxActionHook(hook_id,field_id) {
General Comments 0
You need to be logged in to leave comments. Login now