2020-02-21 00:17:07 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <Access/IAccessEntity.h>
|
2020-06-20 22:44:52 +00:00
|
|
|
#include <Access/AccessRights.h>
|
2020-04-20 22:07:00 +00:00
|
|
|
#include <Access/GrantedRoles.h>
|
2020-03-04 22:27:03 +00:00
|
|
|
#include <Access/SettingsProfileElement.h>
|
2020-02-21 00:17:07 +00:00
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
|
|
|
struct Role : public IAccessEntity
|
|
|
|
{
|
2020-06-20 22:44:52 +00:00
|
|
|
AccessRights access;
|
2020-04-20 22:07:00 +00:00
|
|
|
GrantedRoles granted_roles;
|
2020-03-04 22:27:03 +00:00
|
|
|
SettingsProfileElements settings;
|
2020-02-21 00:17:07 +00:00
|
|
|
|
|
|
|
bool equal(const IAccessEntity & other) const override;
|
|
|
|
std::shared_ptr<IAccessEntity> clone() const override { return cloneImpl<Role>(); }
|
2021-11-18 20:54:18 +00:00
|
|
|
static constexpr const auto TYPE = AccessEntityType::ROLE;
|
|
|
|
AccessEntityType getType() const override { return TYPE; }
|
2020-02-21 00:17:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
using RolePtr = std::shared_ptr<const Role>;
|
|
|
|
}
|