mirror of
https://github.com/fluxcd/flux2.git
synced 2026-04-28 22:28:50 +00:00
Allow users to define team roles
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
This commit is contained in:
parent
2eddcde609
commit
a096bd2d71
3 changed files with 13 additions and 1 deletions
|
|
@ -20,6 +20,7 @@ import (
|
|||
"crypto/elliptic"
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
|
|
@ -174,6 +175,10 @@ func mapTeamSlice(s []string, defaultPermission string) map[string]string {
|
|||
m := make(map[string]string, len(s))
|
||||
for _, v := range s {
|
||||
m[v] = defaultPermission
|
||||
if s := strings.Split(v, ":"); len(s) == 2 {
|
||||
m[s[0]] = s[1]
|
||||
}
|
||||
}
|
||||
|
||||
return m
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue