This commit is contained in:
mr 2024-11-28 14:20:50 +01:00
parent 30be88c8ce
commit 68bb4a51f1

View File

@ -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 {