forked from External/grumble
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 {
|
if token {
|
||||||
// The user is part of this group if the remaining name is part of
|
// The user is part of this group if the remaining name is part of
|
||||||
// his access token list.
|
// his access token list. The name check is case-insensitive.
|
||||||
log.Printf("GroupMemberCheck: Implement token matching")
|
for _, clientToken := range client.Tokens {
|
||||||
|
if strings.ToLower(name) == strings.ToLower(clientToken) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
return false
|
return false
|
||||||
} else if hash {
|
} else if hash {
|
||||||
// The user is part of this group if the remaining name matches his
|
// The user is part of this group if the remaining name matches his
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue