-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
quay-v3.12.4
-
False
-
None
-
False
-
User Experience
-
Quay Enterprise
-
-
Via API it is possible to set more than one Reject limit for an organization quota!
```
curl -X GET -H "Authorization: Bearer ${bearer_token}" -H 'Content-Type: application/json' https://${quay_registry}/api/v1/organization/${orga}/quota | jq
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 262 100 262 0 0 609 0 -::- -::- -::- 609
[
{
"id": 1,
"limit_bytes": 108447924225,
"default_config": false,
"limits": [
],
"default_config_exists": true
}
]
curl -X POST -H "Authorization: Bearer ${bearer_token}" -H 'Content-Type: application/json' --data '
{"threshold_percent": 30, "type": "Reject"}' https://${quay_registry}/api/v1/organization/${orga}/quota/1/limit
"Created"
curl -X GET -H "Authorization: Bearer ${bearer_token}" -H 'Content-Type: application/json' https://${quay_registry}/api/v1/organization/${orga}/quota | jq
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 313 100 313 0 0 733 0 -::- -::- -::- 734
[
{
"id": 1,
"limit_bytes": 108447924225,
"default_config": false,
"limits": [
,
{ "id": 1, "type": "Reject", "limit_percent": 20 } ],
"default_config_exists": true
}
]
```
This shouldn't be possible because having two different reject limits makes absolutely no sense!
Throw an error if one tries to set more than one reject limits!
This affects API only!
On the webUI this situation is caught and a error message is shown!