Add hook for privileges check