#pragma once #include #include #include #include namespace DB { struct Role : public IAccessEntity { AccessRights access; GrantedRoles granted_roles; SettingsProfileElements settings; bool equal(const IAccessEntity & other) const override; std::shared_ptr clone() const override { return cloneImpl(); } static constexpr const auto TYPE = AccessEntityType::ROLE; AccessEntityType getType() const override { return TYPE; } std::vector findDependencies() const override; void replaceDependencies(const std::unordered_map & old_to_new_ids) override; bool isBackupAllowed() const override { return settings.isBackupAllowed(); } }; using RolePtr = std::shared_ptr; }