Hi Snickers,
The decision to shut down an engine always rests with the aircraft's commander. There is no auto-shut down function. That decision is based on engine indications and the state of flight at the time.
In the example that you gave it would not be normal to shut the engine down on the basis of a single indication i.e. Loss of Oil Pressure as it could be only a indicator failure. If however it was accompanied by a rapid rise in Oil Temperature then a shut down would be considered.
The other option would be to operate at a reduced thrust setting and evaluate further indications.
I trust this helps, Cheers