Skip to main content
The Firebolt information schema provides system views that allow you to view metadata and permissions for objects within your current account or database. This page explains how to query and validate user and role privileges at both the account and database levels.

Viewing effective privileges

The following code example shows how to view the effective privileges of the current user:

Usage examples

The following examples demonstrate how to validate privileges at both the account level and the database level. By running a query against the information_schema views, you can check the effective permissions granted to a user or role. Each scenario includes an example query and output to illustrate the scope of the retrieved privileges.

Validating privileges at the account level

If no database is selected, the query runs at the account level and shows account-scoped privileges. Example In the following code example, a user test_user with an account_admin role retrieves their privileges and associated roles for their current user session:
Returns The previous table confirms that test_user has account-level privileges, such as permission to create engines, roles, and databases, as well as permission to modify users and engines.

Validating privileges at the database level

When a specific database is selected, the query retrieves privileges scoped to that database. Example The following code example retrieves the applicable roles and associated privileges, object types, and object names for test_user, who holds an account_admin role from the information schema.
Returns The previous output confirms that test_user has database-level privileges, such as SELECT, INSERT, DELETE, and schema-level MODIFY permissions.