From cde86db44ed2fea6d7e8014c7b8becbeda94bd99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Thu, 9 Nov 2017 11:07:58 +0100 Subject: [PATCH] @require_login(): made all arguments keyword-only This allows us to remove the require_roles kwarg at some point, ensuring that it doesn't fall back to assigning to require_cap instead when that happens. It's also more explicit everywhere, so it's clearer when we check for roles or caps. --- pillar/api/utils/authorization.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pillar/api/utils/authorization.py b/pillar/api/utils/authorization.py index f7a4d031..2c262898 100644 --- a/pillar/api/utils/authorization.py +++ b/pillar/api/utils/authorization.py @@ -276,7 +276,7 @@ def merge_permissions(*args): return effective -def require_login(require_roles=set(), +def require_login(*, require_roles=set(), require_cap='', require_all=False, redirect_to_login=False):