Subject | Re: how to determine User role |
---|---|
Author | tony_bat |
Post date | 2008-03-25T10:52:03Z |
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:
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:
>wrote:
> --- In firebird-support@yahoogroups.com, "tony_bat" <tony_bat@>
> >realize
> > I have three different roles and several users.
> > When a user logs in how can I determine which role to use. I
> > the role must be set at login, but if user does not know rolename 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
>