[Console] "Set a value" enables Save and allows saving a Boolean policy with no parameters selected
Categories
(Enterprise Products :: Console, defect)
Tracking
(Not tracked)
People
(Reporter: mcurtean, Assigned: julienw)
References
Details
Attachments
(1 file)
|
80.36 KB,
image/png
|
Details |
Found in
Sync policy example
Affected versions
commit "598d9605e794d0526e7105628d7aee05556af026"
version "v0.5.0"
Preconditions
A Company admin is logged into the Console.
Steps to reproduce
- From the console > Policy management> search for Sync> select Set a value.
- Click Save.
Expected result
The Save button should remain disabled, since selecting "Set a value" alone, with no parameter configured, is not a meaningful or complete change.
Actual result
Save succeeds without any validation or warning. The policy's sidebar entry updates to "SET." The policy is now saved with all parameters unset — see JSON editor.
In the browser, in about:policies, the policy is not showing, which is expected, but it appears as SET in the console.
| Assignee | ||
Comment 1•1 month ago
|
||
Thanks for the bug. I'll have to check, this might be fixed by my change in https://github.com/mozilla/enterprise-console/pull/457 (hopefully :D ).
Note that the save button will stay enabled always (changed in https://github.com/mozilla/enterprise-console/pull/447), but still we should get an error and refuse to save.
| Assignee | ||
Updated•1 month ago
|
| Assignee | ||
Comment 2•15 days ago
|
||
That PR doesn't fix it at the moment, because we special case the root value to allow this. Maybe we shouldn't?
But a better fix could be to add a minProperties: 1?
Comment 3•15 days ago
|
||
FYI, there is a custom form for the Sync policy currently in the works, that should resolve any problems around this policy. See bug 2079738.
Comment 4•2 days ago
|
||
The custom sync policy form has landed, closing this one. The minProperties: 1 suggestion still has a lot of weight as well, but out of scope here.
Updated•2 days ago
|
Description
•