8012261: update policytool to support java.net.HttpURLPermission

Reviewed-by: mullan
This commit is contained in:
Weijun Wang 2013-05-18 10:15:06 +08:00
parent a8783e010f
commit aab6997ce0
2 changed files with 18 additions and 0 deletions

View File

@ -1447,6 +1447,7 @@ class ToolDialog extends Dialog {
PERM_ARRAY.add(new AWTPerm());
PERM_ARRAY.add(new DelegationPerm());
PERM_ARRAY.add(new FilePerm());
PERM_ARRAY.add(new HttpURLPerm());
PERM_ARRAY.add(new InqSecContextPerm());
PERM_ARRAY.add(new LogPerm());
PERM_ARRAY.add(new MgmtPerm());
@ -3842,6 +3843,20 @@ class FilePerm extends Perm {
}
}
class HttpURLPerm extends Perm {
public HttpURLPerm() {
super("HttpURLPermission",
"java.net.HttpURLPermission",
new String[] {
"<"+ PolicyTool.rb.getString("url") + ">",
},
new String[] {
"<" + PolicyTool.rb.getString("method.list") + ">:<"
+ PolicyTool.rb.getString("request.headers.list") + ">",
});
}
}
class InqSecContextPerm extends Perm {
public InqSecContextPerm() {
super("InquireSecContextPermission",

View File

@ -139,6 +139,9 @@ public class Resources extends java.util.ListResourceBundle {
{"policy.type", "policy type"},
{"property.name", "property name"},
{"provider.name", "provider name"},
{"url", "url"},
{"method.list", "method list"},
{"request.headers.list", "request headers list"},
{"Principal.List", "Principal List"},
{"Permission.List", "Permission List"},
{"Code.Base", "Code Base"},