2020-03-04 22:27:03 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <Access/IAccessEntity.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>
|
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
/// Represents a settings profile created by command
|
|
|
|
/// CREATE SETTINGS PROFILE name SETTINGS x=value MIN=min MAX=max READONLY... TO roles
|
|
|
|
struct SettingsProfile : public IAccessEntity
|
|
|
|
{
|
|
|
|
SettingsProfileElements elements;
|
|
|
|
|
|
|
|
/// Which roles or users should use this settings profile.
|
2020-05-30 20:10:45 +00:00
|
|
|
RolesOrUsersSet to_roles;
|
2020-03-04 22:27:03 +00:00
|
|
|
|
|
|
|
bool equal(const IAccessEntity & other) const override;
|
|
|
|
std::shared_ptr<IAccessEntity> clone() const override { return cloneImpl<SettingsProfile>(); }
|
2020-05-03 03:12:03 +00:00
|
|
|
static constexpr const Type TYPE = Type::SETTINGS_PROFILE;
|
|
|
|
Type getType() const override { return TYPE; }
|
2020-03-04 22:27:03 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
using SettingsProfilePtr = std::shared_ptr<const SettingsProfile>;
|
|
|
|
}
|