Hi,

For the practical part:
Do you have an examples of how to grant permissions? ( for example granting allpermission to the system bundle? )
This is exactly what the sample code in the other thread does.
Or even better, do you have an example of how to limit a bundles' file permissions purely to one directory?
permlist.add(cpa.newConditionalPermissionInfo(null,
new ConditionInfo[]{ new ConditionInfo(BundleLocationCondition.class.getName(), new String[]{ "file:" + webappdir + "*" }) }, new PermissionInfo[]{ new PermissionInfo(FilePermission.class.getName(), "myDirectory/-", "read,write") },
                       "allow"));

In your example code you use the deny action but, by default, everything is denied and you can add permissions. "Deny" can be used to restrict existing permissions. For example, denying a specific permission in allpermission, or allowing to read any file, but those from a specific directory.

Regards,

François


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to