mirror of
https://github.com/openziti/zrok.git
synced 2025-01-22 05:48:46 +01:00
ignore scoped backends when unscoped limit class in limit action (#606)
This commit is contained in:
parent
aee973379c
commit
efd16c2760
@ -32,6 +32,7 @@ func (a *limitAction) HandleAccount(acct *store.Account, _, _ int64, bwc store.B
|
|||||||
}
|
}
|
||||||
|
|
||||||
ignoreBackends := ul.ignoreBackends(bwc)
|
ignoreBackends := ul.ignoreBackends(bwc)
|
||||||
|
logrus.Warnf("ignore backends excluding '%v': %v", bwc, ignoreBackends)
|
||||||
for _, env := range envs {
|
for _, env := range envs {
|
||||||
shrs, err := a.str.FindSharesForEnvironment(env.Id, trx)
|
shrs, err := a.str.FindSharesForEnvironment(env.Id, trx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -35,6 +35,12 @@ func (ul *userLimits) ignoreBackends(bwc store.BandwidthClass) map[sdk.BackendMo
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ignoreBackends
|
return ignoreBackends
|
||||||
|
} else {
|
||||||
|
ignoreBackends := make(map[sdk.BackendMode]bool)
|
||||||
|
for backendMode := range ul.scopes {
|
||||||
|
ignoreBackends[backendMode] = true
|
||||||
|
}
|
||||||
|
return ignoreBackends
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user