1#pragma once
2
3#include <Core/Types.h>
4#include <Core/UUID.h>
5#include <Access/Authentication.h>
6#include <Access/AllowedClientHosts.h>
7
8#include <memory>
9#include <unordered_set>
10#include <vector>
11
12
13namespace Poco
14{
15 namespace Util
16 {
17 class AbstractConfiguration;
18 }
19}
20
21
22namespace DB
23{
24/** User and ACL.
25 */
26struct User
27{
28 String name;
29
30 /// Required password.
31 Authentication authentication;
32
33 String profile;
34
35 AllowedClientHosts allowed_client_hosts;
36
37 /// List of allowed databases.
38 using DatabaseSet = std::unordered_set<std::string>;
39 std::optional<DatabaseSet> databases;
40
41 /// List of allowed dictionaries.
42 using DictionarySet = std::unordered_set<std::string>;
43 std::optional<DictionarySet> dictionaries;
44
45 bool is_quota_management_allowed = false;
46 bool is_row_policy_management_allowed = false;
47
48 User(const String & name_, const String & config_elem, const Poco::Util::AbstractConfiguration & config);
49};
50
51
52}
53