The sim permission model is broken for classes using sim.IResource, it only gives permission for the call method
bring cloud;
let c = new cloud.Counter();
class ExampleOfPermissions {
extern "./some.js"
pub static inflight inc(c: cloud.Counter);
}
new cloud.Function(inflight () => {
c.peek(); // this will give permission to the call functions (which will allow also the inc functionality)
ExampleOfPermissions.inc(c);
});
exports.inc = async (c) => {
await c.inc(1);
}
This happened:
It worked
I expected this:
To tell me that I didn't grant inc permissions to the resource
Is there a workaround?
No response
Anything else?
No response
Wing Version
0.74.8
Node.js Version
No response
Platform(s)
No response
Community Notes
Please vote by adding a 👍 reaction to the issue to help us prioritize.
If you are interested to work on this issue, please leave a comment.
I tried this:
The sim permission model is broken for classes using
sim.IResource
, it only gives permission for thecall
methodThis happened:
It worked
I expected this:
To tell me that I didn't grant
inc
permissions to the resourceIs there a workaround?
No response
Anything else?
No response
Wing Version
0.74.8
Node.js Version
No response
Platform(s)
No response
Community Notes