2020-02-21 00:17:07 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <Access/IAccessEntity.h>
|
2020-04-20 22:07:00 +00:00
|
|
|
#include <Access/GrantedAccess.h>
|
|
|
|
#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-04-20 22:07:00 +00:00
|
|
|
GrantedAccess access;
|
|
|
|
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>(); }
|
2020-05-03 03:12:03 +00:00
|
|
|
static constexpr const Type TYPE = Type::ROLE;
|
|
|
|
Type getType() const override { return TYPE; }
|
2020-02-21 00:17:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
using RolePtr = std::shared_ptr<const Role>;
|
|
|
|
}
|