Mercurial > kallithea
changeset 4254:493ccf3e22e6
user edit: always define c.EXTERN_TYPE_INTERNAL (issue 3)
It is needed by user_edit_profile.html when user_edit.html includes it because
.active='profile'. Some non-obvious code paths could lead to that - such as
editing other user's password.
Instead, set the value it in the controller initialization.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Mon, 14 Jul 2014 21:12:23 +0200 |
parents | 9ccdb6c537c9 |
children | 074f9dd32736 |
files | kallithea/controllers/admin/users.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/controllers/admin/users.py Thu Jul 10 15:20:43 2014 +0100 +++ b/kallithea/controllers/admin/users.py Mon Jul 14 21:12:23 2014 +0200 @@ -66,6 +66,7 @@ def __before__(self): super(UsersController, self).__before__() c.available_permissions = config['available_permissions'] + c.EXTERN_TYPE_INTERNAL = kallithea.EXTERN_TYPE_INTERNAL def index(self, format='html'): """GET /users: All items in the collection""" @@ -245,7 +246,6 @@ c.active = 'profile' c.extern_type = c.user.extern_type c.extern_name = c.user.extern_name - c.EXTERN_TYPE_INTERNAL = kallithea.EXTERN_TYPE_INTERNAL c.perm_user = AuthUser(user_id=id, ip_addr=self.ip_addr) defaults = c.user.get_dict()