mirror of
https://github.com/mumble-voip/grumble.git
synced 2025-12-20 06:10:00 -08:00
GroupMemberCheck: Implement token matching.
This commit is contained in:
parent
e177d4cf89
commit
1ee7aa6ac5
1 changed files with 6 additions and 2 deletions
8
group.go
8
group.go
|
|
@ -181,8 +181,12 @@ func GroupMemberCheck(current *Channel, aclchan *Channel, name string, client *C
|
|||
|
||||
if token {
|
||||
// The user is part of this group if the remaining name is part of
|
||||
// his access token list.
|
||||
log.Printf("GroupMemberCheck: Implement token matching")
|
||||
// his access token list. The name check is case-insensitive.
|
||||
for _, clientToken := range client.Tokens {
|
||||
if strings.ToLower(name) == strings.ToLower(clientToken) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
} else if hash {
|
||||
// The user is part of this group if the remaining name matches his
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue