mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-01 13:01:15 +00:00
26 lines
513 B
Go
26 lines
513 B
Go
|
// Copyright 2024 The Forgejo Authors. All rights reserved.
|
||
|
// SPDX-License-Identifier: MIT
|
||
|
|
||
|
package quota
|
||
|
|
||
|
import (
|
||
|
"code.gitea.io/gitea/modules/setting"
|
||
|
)
|
||
|
|
||
|
func EvaluateDefault(used Used, forSubject LimitSubject) bool {
|
||
|
groups := GroupList{
|
||
|
&Group{
|
||
|
Name: "builtin-default-group",
|
||
|
Rules: []Rule{
|
||
|
{
|
||
|
Name: "builtin-default-rule",
|
||
|
Limit: setting.Quota.Default.Total,
|
||
|
Subjects: LimitSubjects{LimitSubjectSizeAll},
|
||
|
},
|
||
|
},
|
||
|
},
|
||
|
}
|
||
|
|
||
|
return groups.Evaluate(used, forSubject)
|
||
|
}
|