MCPcopy
hub / github.com/dgraph-io/dgraph / GetGroupIDs

Function GetGroupIDs

acl/utils.go:22–33  ·  view source on GitHub ↗

GetGroupIDs returns a slice containing the group ids of all the given groups.

(groups []Group)

Source from the content-addressed store, hash-verified

20
21// GetGroupIDs returns a slice containing the group ids of all the given groups.
22func GetGroupIDs(groups []Group) []string {
23 if len(groups) == 0 {
24 // the user does not have any groups
25 return nil
26 }
27
28 jwtGroups := make([]string, 0, len(groups))
29 for _, g := range groups {
30 jwtGroups = append(jwtGroups, g.GroupID)
31 }
32 return jwtGroups
33}
34
35var (
36 OpRead = "Read"

Callers 2

getAccessJwtFunction · 0.92
TestGetAccessJwtFunction · 0.92

Calls

no outgoing calls

Tested by 1

TestGetAccessJwtFunction · 0.74