[minor] allow adding before and after resource hooks to the user