mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-30 19:42:00 +00:00
31 lines
896 B
C++
31 lines
896 B
C++
#pragma once
|
|
|
|
#include <Access/AccessRights.h>
|
|
#include <Access/SettingsProfileElement.h>
|
|
#include <Core/UUID.h>
|
|
#include <boost/container/flat_set.hpp>
|
|
#include <unordered_map>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
|
|
/// Information about roles enabled for a user at some specific time.
|
|
struct EnabledRolesInfo
|
|
{
|
|
boost::container::flat_set<UUID> current_roles;
|
|
boost::container::flat_set<UUID> enabled_roles;
|
|
boost::container::flat_set<UUID> enabled_roles_with_admin_option;
|
|
std::unordered_map<UUID, String> names_of_roles;
|
|
AccessRights access;
|
|
SettingsProfileElements settings_from_enabled_roles;
|
|
|
|
Strings getCurrentRolesNames() const;
|
|
Strings getEnabledRolesNames() const;
|
|
|
|
friend bool operator ==(const EnabledRolesInfo & lhs, const EnabledRolesInfo & rhs);
|
|
friend bool operator !=(const EnabledRolesInfo & lhs, const EnabledRolesInfo & rhs) { return !(lhs == rhs); }
|
|
};
|
|
|
|
}
|