v.21.9New Feature
Add currentRoles, enabledRoles, and defaultRoles functions
Add new functionscurrentRoles(),enabledRoles(),defaultRoles(). #26780 (Vitaly Baranov).
Why it matters
These functions provide users with the ability to retrieve information about roles currently active or available in their ClickHouse session, enhancing security management and access control visibility.How to use it
Users can call the functions directly in SQL queries to obtain role information. For example, useSELECT currentRoles() to get the roles assigned to the current session.