#pragma once #include #include #include #include #include #include namespace Poco { namespace Util { class AbstractConfiguration; } } namespace DB { /** User and ACL. */ struct User { String name; /// Required password. Authentication authentication; String profile; String quota; //if true then allowed_X was defined in user bool has_allowed_databases = false; bool has_allowed_dictionaries = false; AllowedClientHosts allowed_client_hosts; /// List of allowed databases. using DatabaseSet = std::unordered_set; DatabaseSet databases; /// List of allowed dictionaries. using DictionarySet = std::unordered_set; DictionarySet dictionaries; /// Table properties. using PropertyMap = std::unordered_map; using TableMap = std::unordered_map; using DatabaseMap = std::unordered_map; DatabaseMap table_props; User(const String & name_, const String & config_elem, const Poco::Util::AbstractConfiguration & config); }; }