From a76b0fc98716b5085694a597d48238c95fa95e2d Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Feb 09 2018 09:38:58 +0000 Subject: Move back to use then authenticated method Instead of relying on the present of flask.g.authenticated. The perf gain isn't that important but this change is having consequences in a number of places in the code to the point that it is as simple to revert this change. Signed-off-by: Pierre-Yves Chibon --- diff --git a/pagure/utils.py b/pagure/utils.py index 1485452..f58057a 100644 --- a/pagure/utils.py +++ b/pagure/utils.py @@ -49,7 +49,7 @@ def is_safe_url(target): # pragma: no cover def is_admin(): """ Return whether the user is admin for this application or not. """ - if not flask.g.authenticated: + if not authenticated(): return False user = flask.g.fas_user