From 4ca50ca2391baa7e69900b40e9bdd58025f390af Mon Sep 17 00:00:00 2001 From: robot-clickhouse Date: Mon, 23 Nov 2020 23:01:29 +0300 Subject: [PATCH] Backport #16866 to 20.12: Fix strange code in InterpreterShowAccessQuery --- src/Interpreters/InterpreterShowAccessQuery.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Interpreters/InterpreterShowAccessQuery.cpp b/src/Interpreters/InterpreterShowAccessQuery.cpp index 7bec7c411f..a1f8b5ed65 100644 --- a/src/Interpreters/InterpreterShowAccessQuery.cpp +++ b/src/Interpreters/InterpreterShowAccessQuery.cpp @@ -77,7 +77,7 @@ ASTs InterpreterShowAccessQuery::getCreateAndGrantQueries() const for (const auto & entity : entities) { create_queries.push_back(InterpreterShowCreateAccessEntityQuery::getCreateQuery(*entity, access_control)); - if (entity->isTypeOf(EntityType::USER) || entity->isTypeOf(EntityType::USER)) + if (entity->isTypeOf(EntityType::USER) || entity->isTypeOf(EntityType::ROLE)) boost::range::push_back(grant_queries, InterpreterShowGrantsQuery::getGrantQueries(*entity, access_control)); } -- GitLab