#pragma once #include #include #include #include #include namespace DB { /// Information about roles enabled for a user at some specific time. struct EnabledRolesInfo { boost::container::flat_set current_roles; boost::container::flat_set enabled_roles; boost::container::flat_set enabled_roles_with_admin_option; std::unordered_map 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); } }; }