Commits

Marcin Kuzminski committed 49872ed

removed extra query for default user

Comments (0)

Files changed (1)

rhodecode/model/user.py

 
             #default global
             default_global_perms = self.sa.query(UserToPerm)\
-                .filter(UserToPerm.user == User.by_username('default'))
+                .filter(UserToPerm.user == default_user)
 
             for perm in default_global_perms:
                 user.permissions['global'].add(perm.permission.permission_name)