mirror of
https://github.com/openziti/zrok.git
synced 2025-03-30 17:16:05 +02:00
limits.Agent.enforce needs to consider the store.Account.Limitless flag
This commit is contained in:
parent
04fddce422
commit
edef86d06a
@ -239,6 +239,14 @@ func (a *Agent) enforce(u *metrics.Usage) error {
|
|||||||
}
|
}
|
||||||
defer func() { _ = trx.Rollback() }()
|
defer func() { _ = trx.Rollback() }()
|
||||||
|
|
||||||
|
acct, err := a.str.GetAccount(int(u.AccountId), trx)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if acct.Limitless {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
if enforce, warning, rxBytes, txBytes, err := a.checkAccountLimit(u.AccountId); err == nil {
|
if enforce, warning, rxBytes, txBytes, err := a.checkAccountLimit(u.AccountId); err == nil {
|
||||||
if enforce {
|
if enforce {
|
||||||
enforced := false
|
enforced := false
|
||||||
|
@ -451,4 +451,4 @@ You use the `zrok reserve` command to create _reserved shares_. Reserved shares
|
|||||||
Interested in self-hosting your own `zrok` service instance? See the [self-hosting guide](./guides/self-hosting/self_hosting_guide.md) for details.
|
Interested in self-hosting your own `zrok` service instance? See the [self-hosting guide](./guides/self-hosting/self_hosting_guide.md) for details.
|
||||||
|
|
||||||
[openziti]: https://docs.openziti.io/docs/learn/introduction/ "OpenZiti"
|
[openziti]: https://docs.openziti.io/docs/learn/introduction/ "OpenZiti"
|
||||||
[ zrok-download]: https://zrok.io "Zrok Download"
|
[ zrok-download]: https://zrok.io "zrok Download"
|
Loading…
Reference in New Issue
Block a user