2013-08-10 07:46:45 +00:00
|
|
|
#pragma once
|
|
|
|
|
2020-01-26 09:49:53 +00:00
|
|
|
#include <Access/IAccessEntity.h>
|
2019-10-08 13:44:44 +00:00
|
|
|
#include <Access/Authentication.h>
|
2019-10-08 14:40:24 +00:00
|
|
|
#include <Access/AllowedClientHosts.h>
|
2020-01-12 21:00:55 +00:00
|
|
|
#include <Access/AccessRights.h>
|
2020-03-07 17:37:38 +00:00
|
|
|
#include <Access/ExtendedRoleSet.h>
|
2020-03-04 22:27:03 +00:00
|
|
|
#include <Access/SettingsProfileElement.h>
|
2020-02-21 00:17:07 +00:00
|
|
|
#include <Core/UUID.h>
|
|
|
|
#include <boost/container/flat_set.hpp>
|
2013-08-10 07:46:45 +00:00
|
|
|
|
|
|
|
|
2017-03-25 05:55:49 +00:00
|
|
|
namespace DB
|
2013-08-10 07:46:45 +00:00
|
|
|
{
|
2017-01-14 02:53:40 +00:00
|
|
|
/** User and ACL.
|
2013-08-10 07:46:45 +00:00
|
|
|
*/
|
2020-01-26 09:49:53 +00:00
|
|
|
struct User : public IAccessEntity
|
2013-08-10 07:46:45 +00:00
|
|
|
{
|
2019-10-08 13:44:44 +00:00
|
|
|
Authentication authentication;
|
2020-02-21 00:17:07 +00:00
|
|
|
AllowedClientHosts allowed_client_hosts = AllowedClientHosts::AnyHostTag{};
|
2020-01-12 21:00:55 +00:00
|
|
|
AccessRights access;
|
2020-02-04 22:31:04 +00:00
|
|
|
AccessRights access_with_grant_option;
|
2020-02-21 00:17:07 +00:00
|
|
|
boost::container::flat_set<UUID> granted_roles;
|
|
|
|
boost::container::flat_set<UUID> granted_roles_with_admin_option;
|
2020-03-07 17:37:38 +00:00
|
|
|
ExtendedRoleSet default_roles = ExtendedRoleSet::AllTag{};
|
2020-03-04 22:27:03 +00:00
|
|
|
SettingsProfileElements settings;
|
2020-01-12 21:00:55 +00:00
|
|
|
|
2020-01-26 09:49:53 +00:00
|
|
|
bool equal(const IAccessEntity & other) const override;
|
|
|
|
std::shared_ptr<IAccessEntity> clone() const override { return cloneImpl<User>(); }
|
2013-08-10 07:46:45 +00:00
|
|
|
};
|
|
|
|
|
2020-01-26 09:49:53 +00:00
|
|
|
using UserPtr = std::shared_ptr<const User>;
|
2013-08-10 07:46:45 +00:00
|
|
|
}
|