some
This commit is contained in:
parent
68bb4a51f1
commit
8a11805fe8
@ -40,8 +40,8 @@ type AbstractResource struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (abs *AbstractResource) VerifyAuth(peerID string, groups []string) bool {
|
func (abs *AbstractResource) VerifyAuth(peerID string, groups []string) bool {
|
||||||
if grps, ok := abs.AllowedPeersGroup[peerID]; ok {
|
if grps, ok := abs.AllowedPeersGroup[peerID]; ok || config.GetConfig().Whitelist {
|
||||||
if slices.Contains(grps, "*") || config.GetConfig().Whitelist {
|
if (ok && slices.Contains(grps, "*")) || (!ok && config.GetConfig().Whitelist) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
for _, grp := range grps {
|
for _, grp := range grps {
|
||||||
|
Loading…
Reference in New Issue
Block a user