[rfc][icedtea-web] Launching PolicyEditor from CertWarningPane
Andrew Azores
aazores at redhat.com
Thu Mar 13 19:41:54 UTC 2014
On 03/13/2014 03:08 PM, Andrew Azores wrote:
> Hi,
>
> This patch adds a button which summons a popup menu, currently with
> only one item, allowing the user to launch PolicyEditor directly from
> the warning dialog. The editor appears with the current applet's
> codebase added (if necessary) and pre-selected. This, along with the
> sandbox button and earlier patch allowing JNLPPolicy to use
> per-codebase policy entries and to reload at runtime, allows for easy
> configuration of fine grained permissions granted to an applet.
>
> Feedback/recommendations on the UI here are definitely welcome. At a
> later point, extra items will be added to the popup menu to allow for
> "this run only" temporary permissions to be granted to the applet.
> These choices will have to use a different mechanism for adding the
> permissions, however, since it won't be automatically handled by the
> JNLPPolicy/automatically reloaded by SecurityDelegate, as the policy
> file permissions are. (note the conspicuous lack of any code here to
> actually force a policy reload - this is already handled by the
> sandbox button and SecurityDelegate)
>
> Note that there is a visual bug with PolicyEditor where the checkboxes
> may not be updated correctly, and will be incorrectly blank when the
> currently selected codebase actually does have permissions assigned.
> This will be addressed separately. As a workaround, simply switch to
> "All applets" codebase, then back to the applet-specific one. The
> checkboxes will then correctly update.
>
> http://caff.de/applettest/Signed.html can serve as a test applet again.
>
> ChangeLog:
> Add button with popup menu to launch PolicyEditor
> * netx/net/sourceforge/jnlp/resources/Messages.properties:
> (ButPolicyEditorDropdown, CertWarnPolicyTip,
> CertWarnPolicyEditorItem): new messages
> * netx/net/sourceforge/jnlp/security/dialogs/CertWarningPane.java:
> (addComponents, setTextAndLabels, addButtons) refactored and split
> methods. (createPolicyPermissionsMenu) new method.
> (PolicyEditorLaunchListener) new ActionListener for advancedOptions
> button
>
> Thanks,
>
Sorry, tiny update here. I noticed that there was a small "deadspot" in
the middle of the new button, which was apparently the popupmenu
component, as clicking it caused PolicyEditor to appear. It seems this
was because the menu was added as a child component of the button.
Adding the component to the pane itself, which is the only change
between this new patch and the previous one, resolves this. The popup
menu still appears in the same place and works fine as far as I can tell.
Is there some better way to handle JPopupMenus?
Thanks,
--
Andrew A
-------------- next part --------------
A non-text attachment was scrubbed...
Name: policyeditor-in-dialog-4.patch
Type: text/x-patch
Size: 14355 bytes
Desc: not available
URL: <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20140313/3dccf8f6/policyeditor-in-dialog-4.patch>
More information about the distro-pkg-dev
mailing list