improved authorize method to accept after/before validation setting as argument