Subject Re: how to determine User role
Author tony_bat
Thanks for reply -
I had come to the same conclusion you suggested. Once I remove grants
to public I should have my problem solved. In my senario a user will
only be assigned one role so I will return only one record. All I
need to do is close connection and reopen with role assigned that was
return from sql select;

Thanks again
Tony

--- In firebird-support@yahoogroups.com, "ainpoissee"
<ainpoissee@...> wrote:
>
> --- In firebird-support@yahoogroups.com, "tony_bat" <tony_bat@>
wrote:
> >
> > I have three different roles and several users.
> > When a user logs in how can I determine which role to use. I
realize
> > the role must be set at login, but if user does not know role
name when
> > logging in how can I get role name(s) and then relogin using role
> > appropriate role.
>
> Something like
>
> SELECT RDB$RELATION_NAME FROM RDB$USER_PRIVILEGES WHERE(RDB$USER =
> UPPER(CURRENT_USER))and(RDB$PRIVILEGE = 'M')
>
> should give you a list of roles granted to the current user.
>
>
> HTH
> ain
>