Fix scope for roles

This might not really be necessary but a good check
This commit is contained in:
Abin Simon
2022-03-14 12:34:18 +05:30
parent 8184c23a8f
commit 3aedac3201
4 changed files with 25 additions and 7 deletions
+1 -1
View File
@@ -91,7 +91,7 @@ func main() {
fmt.Println(scope, name, len(perms))
_, err := rs.Create(context.Background(), &rolev3.Role{
Metadata: &commonv3.Metadata{Name: name, Partner: partner, Organization: org, Description: "..."},
Spec: &rolev3.RoleSpec{IsGlobal: true, Scope: "cluster", Rolepermissions: perms}, // TODO: look into scope
Spec: &rolev3.RoleSpec{IsGlobal: true, Scope: scope, Rolepermissions: perms},
})
if err != nil {
log.Fatal(err)