# HG changeset patch # User Mads Kiilerich # Date 1405365143 -7200 # Node ID 493ccf3e22e6aec70fee498b8e7034f3e65fefb6 # Parent 9ccdb6c537c9bf48105c417765cf30b37c167406 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. diff -r 9ccdb6c537c9 -r 493ccf3e22e6 kallithea/controllers/admin/users.py --- 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()