1
0
mirror of synced 2026-02-13 13:06:56 +00:00

Allow users to define team roles

Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
This commit is contained in:
Somtochi Onyekwere
2021-09-27 14:31:34 +01:00
parent 2eddcde609
commit a096bd2d71
3 changed files with 13 additions and 1 deletions

View File

@@ -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
}