Access control: Update evaluator to authorize when at least one of the scopes is a match (#33393)

This commit is contained in:
Vardan Torosyan
2021-04-27 18:22:18 +02:00
committed by GitHub
parent 43bfa2801c
commit 5bf6d7dad8
4 changed files with 87 additions and 20 deletions
+2 -2
View File
@@ -34,7 +34,7 @@ func TestPredefinedRoleGrants(t *testing.T) {
}
}
func TestConcat(t *testing.T) {
func TestConcatPermissions(t *testing.T) {
perms1 := []Permission{
{
Action: "test",
@@ -67,6 +67,6 @@ func TestConcat(t *testing.T) {
},
}
perms := concat(perms1, perms2)
perms := ConcatPermissions(perms1, perms2)
assert.ElementsMatch(t, perms, expected)
}