New issue
Advanced search Search tips

Issue 829329 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Feature



Sign in to add a comment

ADMX: Add examples

Project Member Reported by ljusten@chromium.org, Apr 5 2018

Issue description

The ADMX templates don't contain examples. This makes especially JSON policies hard to figure out for Active Directory admins (see e.g. 'Configure ARC' in GPO editor).

Put the 'example_value' of policy_templates.json into the explaintext of examples from the corresponding policy, see adml_writer.py: self._AddString(policy_name + '_Explain', policy_description)

 
Labels: -Type-Bug Type-Feature

Comment 2 by olsen@google.com, Apr 6 2018

Owner: olsen@chromium.org

Comment 3 by olsen@chromium.org, Apr 9 2018

As discussed offline - will also add examples to ADM - but since ADM has a size limit, will be careful not to exceed it: will link to external examples instead of including them inline.

Comment 5 by olsen@chromium.org, Apr 11 2018

Status: Fixed (was: Assigned)
Labels: -Pri-3 Pri-1
Project Member

Comment 7 by bugdroid1@chromium.org, Jun 8 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0c19503140285fb826ff4cb9104bbe2d8a971d6c

commit 0c19503140285fb826ff4cb9104bbe2d8a971d6c
Author: A Olsen <olsen@chromium.org>
Date: Fri Jun 08 12:28:23 2018

Fix policy example values in ADML writer

The example value formatting code in ADML writer only depends on the
example value itself right now. However, depending on the UI the user
is shown, example values should be shown in different ways. In
particular, it depends if the user is shown a listbox, or a textbox.
This CL shows different example values in different ways,
depending on the UI that the user is shown. Details follow:

If the user needs to input the following list of dicts:
[
  {"key1": "value1" },
  {"key2": "value2" },
  {"key3": "value3" }
]

Then that is exactly what they should type if they are shown a
textbox. But if they are shown a listbox, they should instead type:
{"key1": "value1" }
{"key2": "value2" }
{"key3": "value3" }

And each entry should be in its own listbox field. In other words,
when a user uses a listbox, they don't need to describe the outermost
list because the listbox takes care of it. So, we don't need to show
it in the example value either.

Similarly if the user needs to input the following list of strings:
[
  "value1",
  "value2",
  "value3"
]

They would also type that into a textbox, but would only need to
type the following into a listbox:
value1
value2
value3

So the string quotes are also made unnecessary by the listbox, and
so also should not be shown in the example value.

Bug:  829329 
Change-Id: Iea994c219f1399d83a64af86f3679f991e46f5a6
Reviewed-on: https://chromium-review.googlesource.com/1090918
Commit-Queue: A Olsen <olsen@chromium.org>
Reviewed-by: Lutz Justen <ljusten@chromium.org>
Cr-Commit-Position: refs/heads/master@{#565614}
[modify] https://crrev.com/0c19503140285fb826ff4cb9104bbe2d8a971d6c/components/policy/tools/template_writers/writers/adml_writer.py

Sign in to add a comment