* Expression Format: added getFileSystemAttributes permission

This commit is contained in:
Reinhard Pointner 2013-01-22 09:26:24 +00:00
parent afb0d24c3b
commit f934efa111
2 changed files with 3 additions and 0 deletions

View File

@ -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 = { int index -> listPath(delegate).collect{ replacePathSeparators(getName(it)).trim() }.getAt(index) }
File.metaClass.getRoot = { listPath(delegate)[0] }
File.metaClass.listPath = { listPath(delegate) }
/**

View File

@ -33,6 +33,7 @@ public class SecureCompiledScript extends CompiledScript {
permissions.add(new SocketPermission("*", "connect"));
permissions.add(new PropertyPermission("*", "read"));
permissions.add(new RuntimePermission("getenv.*"));
permissions.add(new RuntimePermission("getFileSystemAttributes"));
// write permissions for temp and cache folders
permissions.add(new FilePermission(new File(System.getProperty("ehcache.disk.store.dir")).getAbsolutePath() + File.separator + "-", "write, delete"));