diff --git a/inventory-app/oidc.py b/inventory-app/oidc.py index 4161cbb..0ca86a2 100644 --- a/inventory-app/oidc.py +++ b/inventory-app/oidc.py @@ -23,7 +23,7 @@ def login_required(_f=None, *, groups=[]): print("doing login redirect") session["original_url"] = request.full_path return do_login() - if groups and not any(g in groups for g in user["groups"]): + if groups and not any(group in groups for group in user["groups"]): return "not allowed", 401 return f(*args, **kwargs) return decorated_function