Check salt.utils.win_functions.HAS_WIN32 in salt.utils.get_user
Check salt.utils.win_functions.HAS_WIN32 in salt.utils.get_user

Commit f3b010ebe597 ("Fix imports") fixed an import issue introduced in
commit 96afc0b6cf14 ("fix: no more test against SYSTEM user") by
removing salt.utils.win_functions.HAS_WIN32 check from
salt/utils/__init__.py and setting HAS_WIN32 to True if
salt.utils.win_functions was successfully imported. However,
salt.utils.win_functions doesn't raise ImportError if required libs
aren't available but sets salt.utils.win_functions.HAS_WIN32 to False in
such a case.

So after commit f3b010ebe597 ("Fix imports") salt.utils.HAS_WIN32 is
always true:

    (py2-env) salt-test@tommynaut:~> uname -a
    Linux tommynaut 4.9.11-1-default #1 SMP PREEMPT Sat Feb 18 17:59:27 UTC 2017 (cf9c670) x86_64 x86_64 x86_64 GNU/Linux
    (py2-env) salt-test@tommynaut:~> python
    Python 2.7.13 (default, Jan 03 2017, 17:41:54) [GCC] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import salt.utils
    >>> salt.utils.HAS_WIN32
    True

salt.utils.get_user thus calls salt.utils.win_functions.get_current_user
without ensuring that all required libs were imported.

Explicitly check salt.utils.win_functions.HAS_WIN32 in get_user(), so it
properly raises CommandExecutionError if required libs aren't available.

saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt