Refine search
public PermissionCollection getPermissions(CodeSource codesource) { Permissions p = new Permissions(); p.add(new AllPermission()); // enable everything return p; } public void refresh() {
public PermissionCollection getPermissions(CodeSource codesource) { PermissionCollection perms = new Permissions(); perms.add(new AllPermission()); return perms; }
/** * Returns a {@code Permission} object representing all needed permissions to * open this connection. The returned permission object depends on the state * of the connection and will be {@code null} if no permissions are * necessary. By default, this method returns {@code AllPermission}. * Subclasses should overwrite this method to return an appropriate * permission object. * * @return the permission object representing the needed permissions to open * this connection. * @throws IOException * if an I/O error occurs while creating the permission object. */ public java.security.Permission getPermission() throws IOException { return new java.security.AllPermission(); }
this.withoutNetworkRestriction = withoutNetworkRestriction; this.withoutExecRestriction = withoutExecRestriction; permissions = new Permissions(); if (withoutExecRestriction && withoutFileRestriction && withoutWriteRestriction && withoutNetworkRestriction) { permissions.add(new AllPermission()); permissions.add(new SocketPermission("*", "connect,accept,listen,resolve")); permissions.add(new RuntimePermission("setFactory"));
/** {@inheritDoc} */ @Override protected PermissionCollection getPermissions(CodeSource codesource) { // apply the all permission policy to all of our classes and packages. AllPermission allPerm = new AllPermission(); PermissionCollection pc = allPerm.newPermissionCollection(); pc.add(allPerm); return pc; }
public PermissionCollection getPermissions(ProtectionDomain domain) { PermissionCollection perms = new Permissions(); perms.add(new AllPermission()); return perms; }
assertTrue(immutability.test(file.toURI().toURL())); assertTrue(immutability.test(FileSystems.getDefault().getRootDirectories().iterator().next())); assertTrue(immutability.test(new AllPermission()));
@Override protected PermissionCollection execLoadPermissions(String userId) { AllPermission allPermission = new AllPermission(); PermissionCollection permissionCollection = allPermission.newPermissionCollection(); permissionCollection.add(allPermission); permissionCollection.setReadOnly(); return permissionCollection; } }
public PermissionCollection getPermissions(CodeSource codesource) { Permissions p = new Permissions(); p.add(new AllPermission()); // enable everything return p; } public void refresh() {
@Override public PermissionCollection getPermissions(ProtectionDomain domain) { PermissionCollection result = new Permissions(); result.add(new AllPermission()); return result; } });
boolean isAllPermissionGranted() { final SecurityManager sm = System.getSecurityManager(); assert sm != null; try { sm.checkPermission(new AllPermission()); } catch (final SecurityException e) { return false; } return true; }
PermissionCollection emptyPermissionCollection = (new AllPermission()).newPermissionCollection(); protectionDomain = new ProtectionDomain(null, emptyPermissionCollection);
/** * Return an all-permissions collection. */ private Permissions getAllPermissions() { Permissions result = new Permissions(); result.add( new AllPermission() ); return result; }
PermissionCollection p = new Permissions(); p.add(new AllPermission()); return p;
/** * constructs new TopSecurityManager */ public TopSecurityManager () { allPermission = new AllPermission(); }
@Override protected PermissionCollection getPermissions (CodeSource code) { Permissions perms = new Permissions(); perms.add(new AllPermission()); return perms; } };
/** * A PermissionCollection with the special AllPermission that enables * all access. * * @see AllPermission * @return the all class ivar */ protected PermissionCollection allPermissions() { if (all == null) { all = new Permissions(); all.add(new AllPermission()); } return all; } }
public Permission getPermission() throws IOException { return new AllPermission(); }
@Override protected PermissionCollection getPermissions(CodeSource codeSource) { Permissions permissions = new Permissions(); permissions.add(new AllPermission()); return permissions; }
/** * A PermissionCollection with the special AllPermission that enables * all access. * * @see AllPermission * @return the all class ivar */ protected PermissionCollection allPermissions() { if (all == null) { all = new Permissions(); all.add(new AllPermission()); } return all; } }