CURRENT_ROLE
<< CURRENT_CONNECTION | FB 2.5 Language Reference | CURRENT_TIME >>
<< CURRENT_CONNECTION | FB 2.1 Language Reference | CURRENT_TIME >>
<< CURRENT_CONNECTION | FB 2.0 Language Reference | CURRENT_TIME >>
CURRENT_ROLE
Added in: 1.0
Description
CURRENT_ROLE
is a context variable containing the role of the currently connected user. If there is no active role, CURRENT_ROLE
is NONE
.
Type: VARCHAR(31)
Example
if (current_role <> 'MANAGER') then exception only_managers_may_delete; else delete from Customers where custno = :custno;
CURRENT_ROLE
always represents a valid role or NONE
. If a user connects with a non-existing role, the engine silently resets it to NONE
without returning an error.
See also:
CURRENT_USER
CURRENT_TRANSACTION
CURRENT_CONNECTION
back to top of page
<< CURRENT_CONNECTION | FB 2.5 Language Reference | CURRENT_TIME >>
<< CURRENT_CONNECTION | FB 2.1 Language Reference | CURRENT_TIME >>
<< CURRENT_CONNECTION | FB 2.0 Language Reference | CURRENT_TIME >>