[rfc][icedtea-web] Temporary Permissions generated via reflection (re-proposal)
Andrew Azores
aazores at redhat.com
Fri Jun 13 15:09:26 UTC 2014
Hi,
When Temporary Permissions on the security dialogs were first
introduced, I proposed to have them generated from the
PolicyEditorPermissions dynamically using reflection, so that
"grantable" permissions were only defined in one place and so
maintenance would be easy, and the TemporaryPermissions class could be
kept small. This was rejected due to the required use of reflection, but
I am re-proposing this patch because I do believe it is a much cleaner
solution, especially now that the number of grantable permissions has
grown and the temporary permissions menu has become a multi-select UI
rather than preset groups.
ChangeLog:
TemporaryPermissions generated via reflection rather than hard coded
* netx/net/sourceforge/jnlp/resources/Messages.properties
(STempPermNoFile, STempPermNoNetwork, STempPermNoExec,
STempNoFileOrNetwork, STempNoExecOrNetwork, STempNoFileOrExec,
STempNoFileOrNetworkOrExec, STempAllMedia, STempSoundOnly,
STempClipboardOnly, STempPrintOnly, STempAllFileAndPropertyAccess,
STempReadLocalFilesAndProperties, STempReflectionOnly): removed
(STempNetwork, STempReadFilesAndProperties,
STempWriteFilesAndProperties,
STempReflectionAndExternal, STempAllMedia): new messages
* netx/net/sourceforge/jnlp/resources/Messages_cs.properties
(STempPermNoFile, STempPermNoNetwork, STempPermNoExec,
STempNoFileOrNetwork, STempNoExecOrNetwork, STempNoFileOrExec,
STempNoFileOrNetworkOrExec, STempAllMedia, STempSoundOnly,
STempClipboardOnly, STempPrintOnly, STempAllFileAndPropertyAccess,
STempReadLocalFilesAndProperties, STempReflectionOnly): removed
* netx/net/sourceforge/jnlp/security/dialogs/TemporaryPermissions.java:
rewrite to use reflection to generate permissions from
PolicyEditorPermissions rather than exposing statically defined values
*
netx/net/sourceforge/jnlp/security/dialogs/TemporaryPermissionsButton.java:
refactor to use new TemporaryPermissions change
*
tests/netx/unit/net/sourceforge/jnlp/security/dialogs/TemporaryPermissionsTest.java:
new tests for TemporaryPermissions
Thanks,
--
Andrew A
-------------- next part --------------
A non-text attachment was scrubbed...
Name: temporary-permissions-reflection.patch
Type: text/x-patch
Size: 23189 bytes
Desc: not available
URL: <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20140613/76a1ff3a/temporary-permissions-reflection-0001.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: temporary-permissions-reflection-tests.patch
Type: text/x-patch
Size: 5613 bytes
Desc: not available
URL: <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20140613/76a1ff3a/temporary-permissions-reflection-tests-0001.patch>
More information about the distro-pkg-dev
mailing list