Recently I came across a problem where I needed to perform two different sets of operations throughout the application for two types of users. The trouble was:
- I needed to turn on or off an operation based on certain condition, which would only be known once the user was logged in, not at the beginning.