mirror of
https://github.com/zulip/zulip.git
synced 2025-10-31 20:13:46 +00:00
require_server_admin: Cut a redundant bit of request-mutation.
The only place this attribute is used is in `update_user_activity`, called only in `process_client`, which won't happen if we end up returning a redirect just below. If we don't, we go and call `add_logging_data` just after, which takes care of this already.
This commit is contained in:
@@ -417,7 +417,6 @@ def require_server_admin(view_func):
|
||||
@wraps(view_func)
|
||||
def _wrapped_view_func(request, *args, **kwargs):
|
||||
# type: (HttpRequest, *Any, **Any) -> HttpResponse
|
||||
request._query = view_func.__name__
|
||||
if not request.user.is_staff:
|
||||
return HttpResponseRedirect(settings.HOME_NOT_LOGGED_IN)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user