[client] Fix wrong privilege check.

TODO: Add tests