* Expression Format: added getFileSystemAttributes permission
This commit is contained in:
parent
afb0d24c3b
commit
f934efa111
|
@ -14,6 +14,8 @@ Object.metaClass.match = { Map cases -> def val = delegate; cases.findResult { s
|
||||||
*/
|
*/
|
||||||
File.metaClass.getAt = { Range range -> listPath(delegate).collect{ replacePathSeparators(getName(it)).trim() }.getAt(range).join(File.separator) }
|
File.metaClass.getAt = { Range range -> listPath(delegate).collect{ replacePathSeparators(getName(it)).trim() }.getAt(range).join(File.separator) }
|
||||||
File.metaClass.getAt = { int index -> listPath(delegate).collect{ replacePathSeparators(getName(it)).trim() }.getAt(index) }
|
File.metaClass.getAt = { int index -> listPath(delegate).collect{ replacePathSeparators(getName(it)).trim() }.getAt(index) }
|
||||||
|
File.metaClass.getRoot = { listPath(delegate)[0] }
|
||||||
|
File.metaClass.listPath = { listPath(delegate) }
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -33,6 +33,7 @@ public class SecureCompiledScript extends CompiledScript {
|
||||||
permissions.add(new SocketPermission("*", "connect"));
|
permissions.add(new SocketPermission("*", "connect"));
|
||||||
permissions.add(new PropertyPermission("*", "read"));
|
permissions.add(new PropertyPermission("*", "read"));
|
||||||
permissions.add(new RuntimePermission("getenv.*"));
|
permissions.add(new RuntimePermission("getenv.*"));
|
||||||
|
permissions.add(new RuntimePermission("getFileSystemAttributes"));
|
||||||
|
|
||||||
// write permissions for temp and cache folders
|
// write permissions for temp and cache folders
|
||||||
permissions.add(new FilePermission(new File(System.getProperty("ehcache.disk.store.dir")).getAbsolutePath() + File.separator + "-", "write, delete"));
|
permissions.add(new FilePermission(new File(System.getProperty("ehcache.disk.store.dir")).getAbsolutePath() + File.separator + "-", "write, delete"));
|
||||||
|
|
Loading…
Reference in New Issue