1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-16 23:29:49 +00:00

only update sudo mode ts if the user is an admin

This commit is contained in:
Shuai Lin
2015-05-05 13:35:04 +08:00
parent 1ad6c30b35
commit 942f7d765f

View File

@@ -24,7 +24,8 @@ def update_sudo_mode_ts(request):
def update_sudo_ts_when_login(**kwargs):
request = kwargs['request']
update_sudo_mode_ts(request)
if request.user.is_staff:
update_sudo_mode_ts(request)
if ENABLE_SUDO_MODE:
user_logged_in.connect(update_sudo_ts_when_login)