Subject Re: getting the role of a user
Author menesoft <mene3@hotmail.com>
--- In ib-support@yahoogroups.com, "Martijn Tonies" <m.tonies@u...> wrote:
> Hi,
>
> > In commercial products as EMS QuickDesk or IBAdmin there is a tool called
> Grant Manager, where one can set roles and assign users to that roles. I
> know I can get role names with something like this:
> >
> > SELECT RDB$ROLE_NAME
> > FROM RDB$ROLES
> >
> > How can I know if a User is assigned to a Role?. Is there a function like
> GetRolesOfUser(User: String): TStrings?
>
> Check the Language Reference, chapter System Tables and Views.
>
> Table RDB$USER_PRIVILEGES is what you're looking for.
>
>
> With regards,
>
> Martijn Tonies
> InterBase Workbench - the developer tool for InterBase & Firebird
> Firebird Workbench - the developer tool for Firebird
> Upscene Productions
> http://www.upscene.com
>
> "This is an object-oriented system.
> If we change anything, the users object."

Yes, the answer was in Table RDB$USER_PRIVILEGES.

If one user is assigned to a role then that user will appear in field RDB$USER and the role name in RDB$RELATION_NAME. Is this true?