From 4f4fa0deeaafa31ce12261608814d8a6e311ff10 Mon Sep 17 00:00:00 2001 From: George J Padayatti Date: Mon, 4 Dec 2023 18:34:18 +0530 Subject: [PATCH] Fix: Suffix with '/' in test mode and prefix with '/v2' when not in test mode Signed-off-by: George J Padayatti --- internal/rbac/rbac.go | 6 ++++-- resources/config | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/internal/rbac/rbac.go b/internal/rbac/rbac.go index bdb9bcc..fa59b91 100644 --- a/internal/rbac/rbac.go +++ b/internal/rbac/rbac.go @@ -159,8 +159,10 @@ func GetRbacPolicies(testMode bool) [][]string { } for _, policy := range policies { - if !testMode { - policy[1] = "/v2" + policy[1] + "/" // Prefix with '/v2' and suffix with '/' if testmode is false + if testMode { + policy[1] = policy[1] + "/" // suffix with '/' + } else { + policy[1] = "/v2" + policy[1] // Prefix with '/v2' } } diff --git a/resources/config b/resources/config index 2b80b8b..e8f8ccd 160000 --- a/resources/config +++ b/resources/config @@ -1 +1 @@ -Subproject commit 2b80b8b54a18103cc10cd0259d17db2187ee69cc +Subproject commit e8f8ccdff8732dcf0f648598f9ed238185226da8