Closed Bug 1436396 Opened 2 years ago Closed 2 years ago

Policy engine - Make boolean type accept 0 and 1 as valid values

Categories

(Firefox :: Enterprise Policies, enhancement)

60 Branch
enhancement
Not set

Tracking

()

RESOLVED FIXED
Firefox 60
Tracking Status
firefox60 --- fixed

People

(Reporter: Felipe, Assigned: Felipe)

References

Details

Attachments

(1 file)

The Windows Registry does not support boolean types. They are represented as numeric values, with the value as 0 or 1.

To make it easy to support boolean types through GPO, we can make the validator code to also accept 0 or 1 as valid boolean types, and convert them to true or false. That way, this will be transparent to any policy using booleans.
Can you think of any cases where a numeric policy would take 0 or 1?

Do we have any numeric policies? Cache size?
The numeric type is implemented, but it hasn't been used yet. I don't think any policy in the list for MVP will use it.

What comes to mind that might use it would be cache size, max number of processes, storage quotas..
But note that this will not cause problems for numeric types, even with a value of 0 or 1. The value will only be converted to true|false if the type has been specified in the schema as a boolean.
Comment on attachment 8949054 [details]
Bug 1436396 - Policy engine - Make boolean type accept 0 and 1 as valid values.

https://reviewboard.mozilla.org/r/218454/#review224258
Attachment #8949054 - Flags: review?(mozilla) → review+
Pushed by felipc@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/0b156d8a695f
Policy engine - Make boolean type accept 0 and 1 as valid values. r=mkaply
https://hg.mozilla.org/mozilla-central/rev/0b156d8a695f
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 60
You need to log in before you can comment on or make changes to this bug.