ClickHouse/src/Access/User.h

34 lines
980 B
C++
Raw Normal View History

#pragma once
#include <Access/IAccessEntity.h>
#include <Access/Authentication.h>
#include <Access/AllowedClientHosts.h>
2020-01-12 21:00:55 +00:00
#include <Access/AccessRights.h>
#include <Access/ExtendedRoleSet.h>
#include <Access/SettingsProfileElement.h>
2020-02-21 00:17:07 +00:00
#include <Core/UUID.h>
#include <boost/container/flat_set.hpp>
2017-03-25 05:55:49 +00:00
namespace DB
{
2017-01-14 02:53:40 +00:00
/** User and ACL.
*/
struct User : public IAccessEntity
{
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;
ExtendedRoleSet default_roles = ExtendedRoleSet::AllTag{};
SettingsProfileElements settings;
2020-01-12 21:00:55 +00:00
bool equal(const IAccessEntity & other) const override;
std::shared_ptr<IAccessEntity> clone() const override { return cloneImpl<User>(); }
};
using UserPtr = std::shared_ptr<const User>;
}