From: sousaedu Date: Wed, 5 May 2021 10:48:16 +0000 (+0200) Subject: Fix 1504 - NBI-HA do not manage correctly new roles (RBAC) X-Git-Tag: v9.1.2~2 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=c33b8f98723038ecc63b659312b7916439602fe7;p=osm%2FNBI.git Fix 1504 - NBI-HA do not manage correctly new roles (RBAC) Reloads the role permission before any authorization is performed. Change-Id: Iaedfc6e298467b3156cc06a677c78f23f8b9d3b4 Signed-off-by: sousaedu --- diff --git a/osm_nbi/auth.py b/osm_nbi/auth.py index 6cbfe68..dcf12c3 100644 --- a/osm_nbi/auth.py +++ b/osm_nbi/auth.py @@ -486,6 +486,7 @@ class Authenticator: :return: True if access granted by permission rules, False if access granted by default rules (Bug 853) :raises: AuthExceptionUnauthorized if access denied """ + self.load_operation_to_allowed_roles() roles_required = self.operation_to_allowed_roles[role_permission] roles_allowed = [role["name"] for role in token_info["roles"]]