From 68bb4a51f1a89cc3529446646e5c0eddb733aa65 Mon Sep 17 00:00:00 2001 From: mr Date: Thu, 28 Nov 2024 14:20:50 +0100 Subject: [PATCH] some --- models/resources/resource_model/resource_model.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/models/resources/resource_model/resource_model.go b/models/resources/resource_model/resource_model.go index 32fecda..d6133b5 100644 --- a/models/resources/resource_model/resource_model.go +++ b/models/resources/resource_model/resource_model.go @@ -4,6 +4,7 @@ import ( "encoding/json" "slices" + "cloud.o-forge.io/core/oc-lib/config" "cloud.o-forge.io/core/oc-lib/dbs" "cloud.o-forge.io/core/oc-lib/models/peer" "cloud.o-forge.io/core/oc-lib/models/utils" @@ -40,7 +41,7 @@ type AbstractResource struct { func (abs *AbstractResource) VerifyAuth(peerID string, groups []string) bool { if grps, ok := abs.AllowedPeersGroup[peerID]; ok { - if slices.Contains(grps, "*") { + if slices.Contains(grps, "*") || config.GetConfig().Whitelist { return true } for _, grp := range grps {