Subject Re: [ib-support] Re: getting the role of a user
Author Martijn Tonies
> > > 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.
>
> 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?
>

Experiment a little yourself - the RDB$PRIVILEGE columns holds 'M' -> member
of.


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."