Changeset - d5ae996eed11
[Not reviewed]
beta
0 3 0
Marcin Kuzminski - 13 years ago 2013-03-05 11:39:30
marcin@python-works.com
show ip for my account, and only in editing your user, showing in all users next to API key is misleading
3 files changed with 13 insertions and 1 deletions:
0 comments (0 inline, 0 general)
rhodecode/controllers/admin/settings.py
Show inline comments
 
@@ -38,7 +38,7 @@ from pylons.i18n.translation import _
 
from rhodecode.lib import helpers as h
 
from rhodecode.lib.auth import LoginRequired, HasPermissionAllDecorator, \
 
    HasPermissionAnyDecorator, NotAnonymous, HasPermissionAny,\
 
    HasReposGroupPermissionAll, HasReposGroupPermissionAny
 
    HasReposGroupPermissionAll, HasReposGroupPermissionAny, AuthUser
 
from rhodecode.lib.base import BaseController, render
 
from rhodecode.lib.celerylib import tasks, run_task
 
from rhodecode.lib.utils import repo2db_mapper, invalidate_cache, \
 
@@ -409,6 +409,8 @@ class SettingsController(BaseController)
 
        # url('admin_settings_my_account')
 

	
 
        c.user = User.get(self.rhodecode_user.user_id)
 
        c.perm_user = AuthUser(user_id=self.rhodecode_user.user_id,
 
                               ip_addr=self.ip_addr)
 
        c.ldap_dn = c.user.ldap_dn
 

	
 
        if c.user.username == 'default':
 
@@ -440,6 +442,8 @@ class SettingsController(BaseController)
 
        # url('admin_settings_my_account_update', id=ID)
 
        uid = self.rhodecode_user.user_id
 
        c.user = User.get(self.rhodecode_user.user_id)
 
        c.perm_user = AuthUser(user_id=self.rhodecode_user.user_id,
 
                               ip_addr=self.ip_addr)
 
        c.ldap_dn = c.user.ldap_dn
 
        email = self.rhodecode_user.email
 
        _form = UserForm(edit=True,
rhodecode/templates/admin/users/user_edit.html
Show inline comments
 
@@ -43,11 +43,14 @@
 
                <label>${_('API key')}:</label> ${c.user.api_key}
 
            </div>
 
        </div>
 
        ##show current ip just if we show ourself
 
        %if c.rhodecode_user.username == c.user.username:
 
        <div class="field">
 
            <div class="label">
 
                <label>${_('Current IP')}:</label> ${c.perm_user.ip_addr or "?"}
 
            </div>
 
        </div>
 
        %endif
 
        <div class="fields">
 
             <div class="field">
 
                <div class="label">
rhodecode/templates/admin/users/user_edit_my_account_form.html
Show inline comments
 
@@ -20,6 +20,11 @@
 
                    <label>${_('API key')}</label> ${c.user.api_key}
 
                </div>
 
            </div>
 
            <div class="field">
 
	            <div class="label">
 
	                <label>${_('Current IP')}:</label> ${c.perm_user.ip_addr or "?"}
 
	            </div>
 
            </div>
 
            <div class="fields">
 
                 <div class="field">
 
                    <div class="label">
0 comments (0 inline, 0 general)