##// END OF EJS Templates
users: enable full edit mode for super admins....
super-admin -
r4740:9d84ba0c default
parent child Browse files
Show More
@@ -311,13 +311,16 b' class UsersView(UserAppView):'
311 311 available_languages=available_languages,
312 312 old_data={'user_id': user_id,
313 313 'email': c.user.email})()
314
315 c.edit_mode = self.request.POST.get('edit') == '1'
314 316 form_result = {}
315 317 old_values = c.user.get_api_data()
316 318 try:
317 319 form_result = _form.to_python(dict(self.request.POST))
318 320 skip_attrs = ['extern_name']
319 321 # TODO: plugin should define if username can be updated
320 if c.extern_type != "rhodecode":
322
323 if c.extern_type != "rhodecode" and not c.edit_mode:
321 324 # forbid updating username for external accounts
322 325 skip_attrs.append('username')
323 326
@@ -485,6 +488,7 b' class UsersView(UserAppView):'
485 488 c.extern_type = c.user.extern_type
486 489 c.extern_name = c.user.extern_name
487 490 c.perm_user = c.user.AuthUser(ip_addr=self.request.remote_addr)
491 c.edit_mode = self.request.GET.get('edit') == '1'
488 492
489 493 defaults = c.user.get_dict()
490 494 defaults.update({'language': c.user.user_data.get('language')})
@@ -221,7 +221,7 b' class Lock(object):'
221 221 """
222 222 logger = loggers["acquire"]
223 223
224 logger.debug("Getting acquire on %r ...", self._name)
224 logger.debug("Getting blocking: %s acquire on %r ...", blocking, self._name)
225 225
226 226 if self._held:
227 227 owner_id = self.get_owner_id()
@@ -1679,9 +1679,8 b' def process_patterns(text_string, repo_n'
1679 1679 errors = []
1680 1680 new_text = text_string
1681 1681
1682 log.debug('Got %s entries to process', len(active_entries))
1682 log.debug('Got %s pattern entries to process', len(active_entries))
1683 1683 for uid, entry in active_entries.items():
1684 log.debug('found issue tracker entry with uid %s', uid)
1685 1684
1686 1685 if not (entry['pat'] and entry['url']):
1687 1686 log.debug('skipping due to missing data')
@@ -12,7 +12,10 b''
12 12 ${h.secure_form(h.route_path('user_update', user_id=c.user.user_id), class_='form', request=request)}
13 13 <% readonly = None %>
14 14 <% disabled = "" %>
15 %if c.extern_type != 'rhodecode':
15 % if c.edit_mode:
16 ${h.hidden('edit', '1')}
17 % endif
18 %if c.extern_type != 'rhodecode' and not c.edit_mode:
16 19 <% readonly = "readonly" %>
17 20 <% disabled = " disabled" %>
18 21 <div class="alert-warning" style="margin:0px 0px 20px 0px; padding: 10px">
@@ -40,6 +43,12 b''
40 43 </div>
41 44 <div class="input">
42 45 ${h.text('username', class_='%s medium' % disabled, readonly=readonly)}
46 <br/>
47 % if c.extern_type != 'rhodecode' and c.is_super_admin:
48 <p class="help-block">
49 ${_('Super-admin can edit this field by entering ')} <a href="${h.current_route_path(request, edit=1)}">edit mode</a>
50 </p>
51 % endif
43 52 </div>
44 53 </div>
45 54 <div class="field">
General Comments 0
You need to be logged in to leave comments. Login now