[client] Fix a function name.

hasPrivilege ->
hasFlag
[client] Add a utility function "hasFlags"