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-04-20 22:07:00 +00:00
|
|
|
#include <Access/GrantedAccess.h>
|
|
|
|
#include <Access/GrantedRoles.h>
|
2020-05-30 20:10:45 +00:00
|
|
|
#include <Access/RolesOrUsersSet.h>
|
2020-03-04 22:27:03 +00:00
|
|
|
#include <Access/SettingsProfileElement.h>
|
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-04-20 22:07:00 +00:00
|
|
|
GrantedAccess access;
|
|
|
|
GrantedRoles granted_roles;
|
2020-05-30 20:10:45 +00:00
|
|
|
RolesOrUsersSet default_roles = RolesOrUsersSet::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>(); }
|
2020-05-03 03:12:03 +00:00
|
|
|
static constexpr const Type TYPE = Type::USER;
|
|
|
|
Type getType() const override { return TYPE; }
|
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
|
|
|
}
|