From 8a11805fe8ada3be7346893ed0a774ea39d89864 Mon Sep 17 00:00:00 2001 From: mr Date: Thu, 28 Nov 2024 14:31:25 +0100 Subject: [PATCH] some --- models/resources/resource_model/resource_model.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/models/resources/resource_model/resource_model.go b/models/resources/resource_model/resource_model.go index d6133b5..7ee2faa 100644 --- a/models/resources/resource_model/resource_model.go +++ b/models/resources/resource_model/resource_model.go @@ -40,8 +40,8 @@ type AbstractResource struct { } func (abs *AbstractResource) VerifyAuth(peerID string, groups []string) bool { - if grps, ok := abs.AllowedPeersGroup[peerID]; ok { - if slices.Contains(grps, "*") || config.GetConfig().Whitelist { + if grps, ok := abs.AllowedPeersGroup[peerID]; ok || config.GetConfig().Whitelist { + if (ok && slices.Contains(grps, "*")) || (!ok && config.GetConfig().Whitelist) { return true } for _, grp := range grps {