This commit is contained in:
mr
2024-12-02 16:59:08 +01:00
parent e2ddd7e4e6
commit 599a614480
2 changed files with 4 additions and 1 deletions

View File

@@ -1,6 +1,7 @@
package collaborative_area
import (
"fmt"
"slices"
"time"
@@ -72,6 +73,7 @@ func (ao *CollaborativeArea) Clear(peerID string) {
func (ao *CollaborativeArea) VerifyAuth(peerID string, groups []string) bool {
if ao.AllowedPeersGroup != nil || config.GetConfig().Whitelist {
if grps, ok := ao.AllowedPeersGroup[peerID]; ok || config.GetConfig().Whitelist {
fmt.Println("grps", grps, "ok", ok, "config.GetConfig().Whitelist", config.GetConfig().Whitelist)
if slices.Contains(grps, "*") || (!ok && config.GetConfig().Whitelist) {
return true
}