From f9c8887627848583d8b81127362cb053003219cf Mon Sep 17 00:00:00 2001 From: Roman Simakov Date: Mon, 23 May 2016 10:00:43 +0300 Subject: [PATCH] Added description of RDB function --- doc/sql.extensions/README.cumulative_roles.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/sql.extensions/README.cumulative_roles.txt b/doc/sql.extensions/README.cumulative_roles.txt index fb6bab125c..772b349e77 100644 --- a/doc/sql.extensions/README.cumulative_roles.txt +++ b/doc/sql.extensions/README.cumulative_roles.txt @@ -51,3 +51,11 @@ GRANT CUMR TO USER US WITH ADMIN OPTION; CONNECT 'LOCALHOST:/TMP/CUMROLES.FDB' USER 'US' PASSWORD 'PAS'; INSERT INTO T VALUES (1); GRANT TINS TO US2; + +Use RDB$ROLE_IN_USE function to check if privileges of specified role are currently available to the current user. + +Syntax: +RDB$ROLE_IN_USE(role_name varchar(32)) RETURNS BOOLEAN + +To get a list of currently active roles you can run: +SELECT * FROM RDB$ROLES WHERE RDB$ROLE_IN_USE(RDB$ROLE_NAME)