From f17f48921d2b12419f34fcd1e0ad2a6b2bdc7d07 Mon Sep 17 00:00:00 2001 From: mr Date: Mon, 2 Dec 2024 13:18:12 +0100 Subject: [PATCH] test --- models/collaborative_area/collaborative_area.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/models/collaborative_area/collaborative_area.go b/models/collaborative_area/collaborative_area.go index ec03d15..06254db 100644 --- a/models/collaborative_area/collaborative_area.go +++ b/models/collaborative_area/collaborative_area.go @@ -70,9 +70,9 @@ func (ao *CollaborativeArea) Clear(peerID string) { } func (ao *CollaborativeArea) VerifyAuth(peerID string, groups []string) bool { - if ao.AllowedPeersGroup != nil && len(ao.AllowedPeersGroup) > 0 { - if grps, ok := ao.AllowedPeersGroup[peerID]; ok { - if slices.Contains(grps, "*") { + if ao.AllowedPeersGroup != nil && len(ao.AllowedPeersGroup) > 0 || config.GetConfig().Whitelist { + if grps, ok := ao.AllowedPeersGroup[peerID]; ok || config.GetConfig().Whitelist { + if slices.Contains(grps, "*") || (!ok && config.GetConfig().Whitelist) { return true } for _, grp := range grps {