Skip to content

Commit

Permalink
Fix: Suffix with '/' in test mode and prefix with '/v2' when not in t…
Browse files Browse the repository at this point in the history
…est mode

Signed-off-by: George J Padayatti <george.padayatti@igrant.io>
  • Loading branch information
georgepadayatti committed Dec 4, 2023
1 parent 82ee9a5 commit 4f4fa0d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions internal/rbac/rbac.go
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
}

Expand Down
2 changes: 1 addition & 1 deletion resources/config

0 comments on commit 4f4fa0d

Please sign in to comment.