Show More
@@ -311,13 +311,16 b' class UsersView(UserAppView):' | |||||
311 | available_languages=available_languages, |
|
311 | available_languages=available_languages, | |
312 | old_data={'user_id': user_id, |
|
312 | old_data={'user_id': user_id, | |
313 | 'email': c.user.email})() |
|
313 | 'email': c.user.email})() | |
|
314 | ||||
|
315 | c.edit_mode = self.request.POST.get('edit') == '1' | |||
314 | form_result = {} |
|
316 | form_result = {} | |
315 | old_values = c.user.get_api_data() |
|
317 | old_values = c.user.get_api_data() | |
316 | try: |
|
318 | try: | |
317 | form_result = _form.to_python(dict(self.request.POST)) |
|
319 | form_result = _form.to_python(dict(self.request.POST)) | |
318 | skip_attrs = ['extern_name'] |
|
320 | skip_attrs = ['extern_name'] | |
319 | # TODO: plugin should define if username can be updated |
|
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 | # forbid updating username for external accounts |
|
324 | # forbid updating username for external accounts | |
322 | skip_attrs.append('username') |
|
325 | skip_attrs.append('username') | |
323 |
|
326 | |||
@@ -485,6 +488,7 b' class UsersView(UserAppView):' | |||||
485 | c.extern_type = c.user.extern_type |
|
488 | c.extern_type = c.user.extern_type | |
486 | c.extern_name = c.user.extern_name |
|
489 | c.extern_name = c.user.extern_name | |
487 | c.perm_user = c.user.AuthUser(ip_addr=self.request.remote_addr) |
|
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 | defaults = c.user.get_dict() |
|
493 | defaults = c.user.get_dict() | |
490 | defaults.update({'language': c.user.user_data.get('language')}) |
|
494 | defaults.update({'language': c.user.user_data.get('language')}) |
@@ -221,7 +221,7 b' class Lock(object):' | |||||
221 | """ |
|
221 | """ | |
222 | logger = loggers["acquire"] |
|
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 | if self._held: |
|
226 | if self._held: | |
227 | owner_id = self.get_owner_id() |
|
227 | owner_id = self.get_owner_id() |
@@ -1679,9 +1679,8 b' def process_patterns(text_string, repo_n' | |||||
1679 | errors = [] |
|
1679 | errors = [] | |
1680 | new_text = text_string |
|
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 | for uid, entry in active_entries.items(): |
|
1683 | for uid, entry in active_entries.items(): | |
1684 | log.debug('found issue tracker entry with uid %s', uid) |
|
|||
1685 |
|
1684 | |||
1686 | if not (entry['pat'] and entry['url']): |
|
1685 | if not (entry['pat'] and entry['url']): | |
1687 | log.debug('skipping due to missing data') |
|
1686 | log.debug('skipping due to missing data') |
@@ -12,7 +12,10 b'' | |||||
12 | ${h.secure_form(h.route_path('user_update', user_id=c.user.user_id), class_='form', request=request)} |
|
12 | ${h.secure_form(h.route_path('user_update', user_id=c.user.user_id), class_='form', request=request)} | |
13 | <% readonly = None %> |
|
13 | <% readonly = None %> | |
14 | <% disabled = "" %> |
|
14 | <% disabled = "" %> | |
15 |
%if c.e |
|
15 | % if c.edit_mode: | |
|
16 | ${h.hidden('edit', '1')} | |||
|
17 | % endif | |||
|
18 | %if c.extern_type != 'rhodecode' and not c.edit_mode: | |||
16 | <% readonly = "readonly" %> |
|
19 | <% readonly = "readonly" %> | |
17 | <% disabled = " disabled" %> |
|
20 | <% disabled = " disabled" %> | |
18 | <div class="alert-warning" style="margin:0px 0px 20px 0px; padding: 10px"> |
|
21 | <div class="alert-warning" style="margin:0px 0px 20px 0px; padding: 10px"> | |
@@ -40,6 +43,12 b'' | |||||
40 | </div> |
|
43 | </div> | |
41 | <div class="input"> |
|
44 | <div class="input"> | |
42 | ${h.text('username', class_='%s medium' % disabled, readonly=readonly)} |
|
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 | </div> |
|
52 | </div> | |
44 | </div> |
|
53 | </div> | |
45 | <div class="field"> |
|
54 | <div class="field"> |
General Comments 0
You need to be logged in to leave comments.
Login now