-1 should not be used to represent "unlimited" for activation keys and host collections
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1105175
Description of problem:
Created a host-collection whose value was set to '10' for content-host limit. Later, I updated the limit with "-1", as soon as I type "-1", the text box closes and points to "unlimited" checkbox.
So -1 shouldn't be allowed for content host limit.
Version-Release number of selected component (if applicable):
sat6 beta snap8 (Satellite-6.0.3-RHEL-6-20140604.0)
Steps to Reproduce:
1. create host collection with limit 10
2. update the limit with -1
on updating the limit with -1, ticks the checkbox to unlimited
user shouldn't be allowed to set limit to -1
A related bz #848564
This commit changes the way we handle limited fields such as Content Host
number of systems and Activation Key usage limit. Instead of representing
"unlimited" as -1 we now represent it as a boolean on the object.
#4 Updated by Walden Raines almost 6 years ago
- Subject changed from user shouldn't be allowed to update the content-host limit to -1 for selected host-colection to -1 should not be used to represent "unlimited"
- Priority changed from Low to Normal
- Target version set to 49
Changing summary this to reflect system-wide nature of problem.
For both activation keys and host collections we should not use -1 to represent "unlimited". This issue captures the following work:
- Fix the client side UI so that only > 1 limits can be sent
- Fix the server side so that "unlimited" is represented as a boolean and that limit is ignored if true
- Check that candlepin integration still works