diff --git a/IM/InfrastructureList.py b/IM/InfrastructureList.py index c5c85d4b..c9b1d99c 100644 --- a/IM/InfrastructureList.py +++ b/IM/InfrastructureList.py @@ -254,6 +254,8 @@ def _gen_where_from_auth(auth): like = "" if auth: for elem in auth.getAuthInfo('InfrastructureManager'): + if elem.get("admin"): + return "" if elem.get("username"): if like: like += " or " @@ -266,6 +268,8 @@ def _gen_filter_from_auth(auth): like = "" if auth: for elem in auth.getAuthInfo('InfrastructureManager'): + if elem.get("admin"): + return {} if elem.get("username"): if like: like += "|"