test
This commit is contained in:
parent
cb21db672b
commit
f17f48921d
@ -70,9 +70,9 @@ func (ao *CollaborativeArea) Clear(peerID string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (ao *CollaborativeArea) VerifyAuth(peerID string, groups []string) bool {
|
func (ao *CollaborativeArea) VerifyAuth(peerID string, groups []string) bool {
|
||||||
if ao.AllowedPeersGroup != nil && len(ao.AllowedPeersGroup) > 0 {
|
if ao.AllowedPeersGroup != nil && len(ao.AllowedPeersGroup) > 0 || config.GetConfig().Whitelist {
|
||||||
if grps, ok := ao.AllowedPeersGroup[peerID]; ok {
|
if grps, ok := ao.AllowedPeersGroup[peerID]; ok || config.GetConfig().Whitelist {
|
||||||
if slices.Contains(grps, "*") {
|
if slices.Contains(grps, "*") || (!ok && config.GetConfig().Whitelist) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
for _, grp := range grps {
|
for _, grp := range grps {
|
||||||
|
Loading…
Reference in New Issue
Block a user