mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-18 00:00:00 +00:00
only update sudo mode ts if the user is an admin
This commit is contained in:
@@ -24,6 +24,7 @@ def update_sudo_mode_ts(request):
|
|||||||
|
|
||||||
def update_sudo_ts_when_login(**kwargs):
|
def update_sudo_ts_when_login(**kwargs):
|
||||||
request = kwargs['request']
|
request = kwargs['request']
|
||||||
|
if request.user.is_staff:
|
||||||
update_sudo_mode_ts(request)
|
update_sudo_mode_ts(request)
|
||||||
|
|
||||||
if ENABLE_SUDO_MODE:
|
if ENABLE_SUDO_MODE:
|
||||||
|
Reference in New Issue
Block a user