# HG changeset patch # User Marcin Kuzminski # Date 2017-03-13 19:51:47 # Node ID 1f65595182f895d2c2ceb5b573baeb610e516414 # Parent 46c056e8307b67bae94df8a7a49255604db44804 pyramid-views: always register auth_user for via the base view. - we always need this to be set anyway so we shouldn't repeat it. diff --git a/rhodecode/apps/_base/__init__.py b/rhodecode/apps/_base/__init__.py --- a/rhodecode/apps/_base/__init__.py +++ b/rhodecode/apps/_base/__init__.py @@ -43,7 +43,9 @@ class BaseAppView(object): self._rhodecode_user = request.user def _get_local_tmpl_context(self): - return TemplateArgs() + c = TemplateArgs() + c.auth_user = self.request.user + return c def _register_global_c(self, tmpl_args): """ diff --git a/rhodecode/apps/admin/views/users.py b/rhodecode/apps/admin/views/users.py --- a/rhodecode/apps/admin/views/users.py +++ b/rhodecode/apps/admin/views/users.py @@ -45,7 +45,6 @@ class AdminUsersView(BaseAppView): def load_default_context(self): c = self._get_local_tmpl_context() - c.auth_user = self.request.user c.allow_scoped_tokens = self.ALLOW_SCOPED_TOKENS self._register_global_c(c) return c diff --git a/rhodecode/apps/my_account/views.py b/rhodecode/apps/my_account/views.py --- a/rhodecode/apps/my_account/views.py +++ b/rhodecode/apps/my_account/views.py @@ -43,7 +43,6 @@ class MyAccountView(BaseAppView): def load_default_context(self): c = self._get_local_tmpl_context() - c.auth_user = self.request.user c.user = c.auth_user.get_instance() c.allow_scoped_tokens = self.ALLOW_SCOPED_TOKENS self._register_global_c(c)