Changeset - 493ccf3e22e6
[Not reviewed]
default
0 1 0
Mads Kiilerich (kiilerix) - 11 years ago 2014-07-14 19:12:23
mads@kiilerich.com
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.
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general) First comment
kallithea/controllers/admin/users.py
Show inline comments
 
@@ -66,6 +66,7 @@ class UsersController(BaseController):
 
    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 @@ class UsersController(BaseController):
 
        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()
0 comments (0 inline, 0 general) First comment
You need to be logged in to comment. Login now