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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user