Adding a function that checkes if session downgrade is valid or not. Similarily to invalidSessionDowngrade, we check if
- Some user is currently logged in
- The action is trying to downgrade the session (currentUserInfo is being set to null or {anonymous: true})
- The user is the same user the action was dispatched for
- The session is the same session the action was dispatched for (checking if CSAT changed)
See this discussion for examples of scenarios in which a session downgrade is invalid