Add update permissions hook to sharing

Trying again, @butonic @VicDeo @DeepDiver1975