Subject Re: [Firebird-Java] Find permissions
Author Rick Fincher
Hi Nick,

The RDB$USER_PRIVILEGES system table in each database has that data for each
user or role and table or view.

Roles are listed like other users (in the RDB$USER column) except they have
a 13 in the RDB$USER_TYPE column instead of an 8, except for the special
PUBLIC role which is aso listed as an 8.

Users with a letter M in the RDB$PRIVILEGE column indicates that the user is
in a role. The name of the role is in the RDB$RELATION_NAME column. Those
rows will also have a 13 in the RDB$OBJECT_TYPE column instead of zero.

If the RDB$PRIVILEGE column doesn't have a letter M in it, the letter is the
privilege code and the table or view that the code applies to is in the
RDB$RELATION_NAME column.

The RDB$ROLES system table has the role name/owner name data that lets you
know who owns the role.

If that sounds clear as mud, it is simpler than the description. Take a
look at the RDB$USER_PRIVILEGES system table with your favorite db viewer.

Hope this helps.

Rick

----- Original Message -----
From: "Nick Sydenham" <nsydenham@...>


> What is the easiest way of finding out what permissions a particular
> role or user has been assigned?