Moved account access validation into function
Moved account access validation into function

Refactored so that validation of access to an account is performed in a
function "validate(...)"

FredHutch/swift-switch-account,FredHutch/swift-switch-account,FredHutch/swift-switch-account