added permission to the hook parameters to make it easier to check