# HG changeset patch # User Marcin Kuzminski # Date 2020-02-21 21:03:35 # Node ID 864142424e7f1ef2a0b728efa5d5df144beaf375 # Parent 7c8ad7af21f5bfd89c82c9feffb9bbf76fe2132b user-accounts: show info about password for external accounts. diff --git a/rhodecode/apps/my_account/views/my_account.py b/rhodecode/apps/my_account/views/my_account.py --- a/rhodecode/apps/my_account/views/my_account.py +++ b/rhodecode/apps/my_account/views/my_account.py @@ -76,6 +76,7 @@ class MyAccountView(BaseAppView, DataGri def my_account_profile(self): c = self.load_default_context() c.active = 'profile' + c.extern_type = c.user.extern_type return self._get_template_context(c) @LoginRequired() diff --git a/rhodecode/templates/admin/my_account/my_account_auth_tokens.mako b/rhodecode/templates/admin/my_account/my_account_auth_tokens.mako --- a/rhodecode/templates/admin/my_account/my_account_auth_tokens.mako +++ b/rhodecode/templates/admin/my_account/my_account_auth_tokens.mako @@ -71,7 +71,7 @@
${h.text('description', class_='medium', placeholder=_('Description'))} ${h.hidden('lifetime')} - ${h.select('role', '', c.role_options)} + ${h.select('role', request.GET.get('token_role', ''), c.role_options)} % if c.allow_scoped_tokens: ${h.hidden('scope_repo_id')} diff --git a/rhodecode/templates/admin/my_account/my_account_password.mako b/rhodecode/templates/admin/my_account/my_account_password.mako --- a/rhodecode/templates/admin/my_account/my_account_password.mako +++ b/rhodecode/templates/admin/my_account/my_account_password.mako @@ -4,7 +4,9 @@ % if c.extern_type != 'rhodecode':

${_('Your user account details are managed by an external source. Details cannot be managed here.')} -
${_('Source type')}: ${c.extern_type} +
${_('For VCS access please generate')} + Authentication Token or SSH Key. +
${_('Source type')}: ${c.extern_type}

% else: ${c.form.render() | n} diff --git a/rhodecode/templates/admin/my_account/my_account_profile.mako b/rhodecode/templates/admin/my_account/my_account_profile.mako --- a/rhodecode/templates/admin/my_account/my_account_profile.mako +++ b/rhodecode/templates/admin/my_account/my_account_profile.mako @@ -8,6 +8,17 @@
+ %if c.extern_type != 'rhodecode': + <% readonly = "readonly" %> + <% disabled = " disabled" %> +
+ ${_('This user was created from external source (%s). Editing some of the settings is limited.' % c.extern_type)} +
+
+ ${_('For VCS access please generate')} + Authentication Token or SSH Key. +
+ %endif
${_('Photo')}: diff --git a/rhodecode/templates/admin/my_account/my_account_profile_edit.mako b/rhodecode/templates/admin/my_account/my_account_profile_edit.mako --- a/rhodecode/templates/admin/my_account/my_account_profile_edit.mako +++ b/rhodecode/templates/admin/my_account/my_account_profile_edit.mako @@ -11,13 +11,19 @@ %if c.extern_type != 'rhodecode': <% readonly = "readonly" %> - <% disabled = "disabled" %> + <% disabled = " disabled" %> +
+ ${_('This user was created from external source (%s). Editing some of the settings is limited.' % c.extern_type)} +
+
+ ${_('For VCS access please generate')} + Authentication Token or SSH Key. +
+ %endif + + %if c.extern_type != 'rhodecode':
-

${_('Your user account details are managed by an external source. Details cannot be managed here.')} -
${_('Source type')}: ${c.extern_type} -

-