Hi,
Here is an updated version of the patch which fixes a few small bugs, including making sure it checks the update permission plus a bug found by Joel Jacobsson when it was called by SPI.
Andreas