1. A system that regulates access to a resource requested by an operation executing on a computer, the operation invoking a plurality of functions that operate upon code during execution, the system comprising: a policy file that stores permissions for each of the functions, the permissions authorizing types of access to the resource based on a source of the code and an executor of the code; a call stack that stores the functions and executors as frames in an order of invocation by the operation, wherein each of the frames includes a code identifier that identifies the source of the code for a corresponding one of the functions and an executor identifier that identifies the executor on whose behalf the code is being executed; and an execution unit that grants access to the resource when the types of access authorized by the permissions of all of the functions and executors on the call stack encompass the access requested by the operation.