Show More
@@ -32,6 +32,7 b' from rhodecode.lib.vcs import nodes' | |||||
32 | from rhodecode.lib.vcs.conf import settings |
|
32 | from rhodecode.lib.vcs.conf import settings | |
33 | from rhodecode.tests import assert_session_flash |
|
33 | from rhodecode.tests import assert_session_flash | |
34 | from rhodecode.tests.fixture import Fixture |
|
34 | from rhodecode.tests.fixture import Fixture | |
|
35 | from rhodecode.model.db import Session | |||
35 |
|
36 | |||
36 | fixture = Fixture() |
|
37 | fixture = Fixture() | |
37 |
|
38 | |||
@@ -166,8 +167,8 b' class TestFilesViews(object):' | |||||
166 | {'message': 'b', 'branch': new_branch} |
|
167 | {'message': 'b', 'branch': new_branch} | |
167 | ] |
|
168 | ] | |
168 | backend.create_repo(commits) |
|
169 | backend.create_repo(commits) | |
169 |
|
||||
170 | backend.repo.landing_rev = "branch:%s" % new_branch |
|
170 | backend.repo.landing_rev = "branch:%s" % new_branch | |
|
171 | Session().commit() | |||
171 |
|
172 | |||
172 | # get response based on tip and not new commit |
|
173 | # get response based on tip and not new commit | |
173 | response = self.app.get( |
|
174 | response = self.app.get( |
@@ -992,10 +992,6 b' class AuthUser(object):' | |||||
992 | def get_instance(self): |
|
992 | def get_instance(self): | |
993 | return User.get(self.user_id) |
|
993 | return User.get(self.user_id) | |
994 |
|
994 | |||
995 | def update_lastactivity(self): |
|
|||
996 | if self.user_id: |
|
|||
997 | User.get(self.user_id).update_lastactivity() |
|
|||
998 |
|
||||
999 | def propagate_data(self): |
|
995 | def propagate_data(self): | |
1000 | """ |
|
996 | """ | |
1001 | Fills in user data and propagates values to this instance. Maps fetched |
|
997 | Fills in user data and propagates values to this instance. Maps fetched | |
@@ -1500,9 +1496,6 b' class LoginRequired(object):' | |||||
1500 | 'user %s authenticating with:%s IS authenticated on func %s' |
|
1496 | 'user %s authenticating with:%s IS authenticated on func %s' | |
1501 | % (user, reason, loc)) |
|
1497 | % (user, reason, loc)) | |
1502 |
|
1498 | |||
1503 | # update user data to check last activity |
|
|||
1504 | user.update_lastactivity() |
|
|||
1505 | Session().commit() |
|
|||
1506 | return func(*fargs, **fkwargs) |
|
1499 | return func(*fargs, **fkwargs) | |
1507 | else: |
|
1500 | else: | |
1508 | log.warning( |
|
1501 | log.warning( |
@@ -514,7 +514,6 b' class SimpleVCS(object):' | |||||
514 | return auth_result.wsgi_application( |
|
514 | return auth_result.wsgi_application( | |
515 | environ, start_response) |
|
515 | environ, start_response) | |
516 |
|
516 | |||
517 |
|
||||
518 | # ============================================================== |
|
517 | # ============================================================== | |
519 | # CHECK PERMISSIONS FOR THIS REQUEST USING GIVEN USERNAME |
|
518 | # CHECK PERMISSIONS FOR THIS REQUEST USING GIVEN USERNAME | |
520 | # ============================================================== |
|
519 | # ============================================================== | |
@@ -522,8 +521,6 b' class SimpleVCS(object):' | |||||
522 | if not self.valid_and_active_user(user): |
|
521 | if not self.valid_and_active_user(user): | |
523 | return HTTPForbidden()(environ, start_response) |
|
522 | return HTTPForbidden()(environ, start_response) | |
524 | username = user.username |
|
523 | username = user.username | |
525 | user.update_lastactivity() |
|
|||
526 | meta.Session().commit() |
|
|||
527 |
|
524 | |||
528 | # check user attributes for password change flag |
|
525 | # check user attributes for password change flag | |
529 | user_obj = user |
|
526 | user_obj = user |
General Comments 0
You need to be logged in to leave comments.
Login now