v.24.10Improvement

Add WITH IMPLICIT and FINAL to SHOW GRANTS Command and Fix Bug with Implicit Grants

Add WITH IMPLICIT and FINAL keywords to the SHOW GRANTS command. Fix a minor bug with implicit grants: #70094. #70293 (pufit).
Add WITH IMPLICIT and FINAL keywords to the SHOW GRANTS command, enabling enhanced control and visibility of user grants in ClickHouse.

Why it matters

This feature addresses the need to differentiate between explicitly granted privileges and those inherited implicitly. It also fixes a minor bug related to implicit grants, improving the accuracy and clarity of privilege listings for users and administrators.

How to use it

Users can utilize the enhanced SHOW GRANTS command with the new WITH IMPLICIT keyword to include implicitly inherited grants in the output, and the FINAL keyword to display the final set of effective grants. For example:

SHOW GRANTS <code>WITH IMPLICIT</code> FOR user_name;
SHOW GRANTS <code>FINAL</code> FOR user_name;