Re: PL/SQL testing for assigned roles

From: Dave Macpherson <dave_at_fifthd.ca>
Date: 1997/01/07
Message-ID: <32d27b1b.332558738_at_news.sas.ab.ca>#1/1


On Tue, 07 Jan 1997 09:49:42 -0800, Mike West <mwest_at_hort.cri.nz> wrote:

>I am writing an application using paradox as the front end to an oracle
>database. I want to be be able to test to see what role a user has
>assigned to them and use this to determine what menus etc to give the
>user access to.
>Is there an easy way in PL/SQL to test to see if a user belongs to a
>certain role??? I have tried using the user_role_privs table but the
>problem with this method is that when the procedure is called it gives
>the user_role_privs info for the owner of the procedure and not the
>current user.

Perhaps you can use the Oracle-supplied package 'DMBS_SESSION' to achieve what you are looking for. I believe the procedure DBMS_SESSION.IS_ROLE_ENABLED (returns a boolean) will suffice.

Regards,
Dave Macpherson Received on Tue Jan 07 1997 - 00:00:00 CET

Original text of this message