Replace `unless` with `if` in `isAuthorized` implementation.