diff --git a/rhodecode/apps/repository/tests/test_repo_files.py b/rhodecode/apps/repository/tests/test_repo_files.py --- a/rhodecode/apps/repository/tests/test_repo_files.py +++ b/rhodecode/apps/repository/tests/test_repo_files.py @@ -32,6 +32,7 @@ from rhodecode.lib.vcs import nodes from rhodecode.lib.vcs.conf import settings from rhodecode.tests import assert_session_flash from rhodecode.tests.fixture import Fixture +from rhodecode.model.db import Session fixture = Fixture() @@ -166,8 +167,8 @@ class TestFilesViews(object): {'message': 'b', 'branch': new_branch} ] backend.create_repo(commits) - backend.repo.landing_rev = "branch:%s" % new_branch + Session().commit() # get response based on tip and not new commit response = self.app.get( diff --git a/rhodecode/lib/auth.py b/rhodecode/lib/auth.py --- a/rhodecode/lib/auth.py +++ b/rhodecode/lib/auth.py @@ -992,10 +992,6 @@ class AuthUser(object): def get_instance(self): return User.get(self.user_id) - def update_lastactivity(self): - if self.user_id: - User.get(self.user_id).update_lastactivity() - def propagate_data(self): """ Fills in user data and propagates values to this instance. Maps fetched @@ -1500,9 +1496,6 @@ class LoginRequired(object): 'user %s authenticating with:%s IS authenticated on func %s' % (user, reason, loc)) - # update user data to check last activity - user.update_lastactivity() - Session().commit() return func(*fargs, **fkwargs) else: log.warning( diff --git a/rhodecode/lib/middleware/simplevcs.py b/rhodecode/lib/middleware/simplevcs.py --- a/rhodecode/lib/middleware/simplevcs.py +++ b/rhodecode/lib/middleware/simplevcs.py @@ -514,7 +514,6 @@ class SimpleVCS(object): return auth_result.wsgi_application( environ, start_response) - # ============================================================== # CHECK PERMISSIONS FOR THIS REQUEST USING GIVEN USERNAME # ============================================================== @@ -522,8 +521,6 @@ class SimpleVCS(object): if not self.valid_and_active_user(user): return HTTPForbidden()(environ, start_response) username = user.username - user.update_lastactivity() - meta.Session().commit() # check user attributes for password change flag user_obj = user