mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-15 12:14:18 +00:00
Merge pull request #71332 from ClickHouse/pufit/fix-inconsistent-ast-wildcard-grants
Fix inconsistent AST formatting when granting wrong wildcard grants
This commit is contained in:
commit
e2c372f8b3
@ -117,6 +117,7 @@ GRANT SELECT ON db*.* TO john -- correct
|
||||
GRANT SELECT ON *.my_table TO john -- wrong
|
||||
GRANT SELECT ON foo*bar TO john -- wrong
|
||||
GRANT SELECT ON *suffix TO john -- wrong
|
||||
GRANT SELECT(foo) ON db.table* TO john -- wrong
|
||||
```
|
||||
|
||||
## Privileges
|
||||
|
@ -155,6 +155,9 @@ namespace
|
||||
|
||||
for (auto & [access_flags, columns] : access_and_columns)
|
||||
{
|
||||
if (wildcard && !columns.empty())
|
||||
return false;
|
||||
|
||||
AccessRightsElement element;
|
||||
element.access_flags = access_flags;
|
||||
element.columns = std::move(columns);
|
||||
|
@ -19,4 +19,6 @@ REVOKE SELECT ON team*.* FROM user_03141;
|
||||
SHOW GRANTS FOR user_03141;
|
||||
SELECT '---';
|
||||
|
||||
GRANT SELECT(bar) ON foo.test* TO user_03141; -- { clientError SYNTAX_ERROR }
|
||||
|
||||
DROP USER user_03141;
|
||||
|
Loading…
Reference in New Issue
Block a user