Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Interbase roles in stored procedures

Status
Not open for further replies.

caf

Programmer
Sep 19, 2000
124
ZA
Hi

Is there anyway I can determine within a stored procedure whether the user executing the stored proceudre is a member of a particular role?
I'm using IB 6 (Open Source)

Thank You
 
Okay, Here's the sql to the solution
Code:
SELECT a.RDB$USER, a.RDB$RELATION_NAME
  FROM RDB$USER_PRIVILEGES a, RDB$ROLES b
  WHERE a.RDB$RELATION_NAME = b.RDB$ROLE_NAME
  AND a.RDB$USER = USER
It was a stupid question, I'm sorry I posted it. [blush]
 
If the user has been granted multiple rows, this will return more than a single row. Keep that in mind.

Martijn Tonies
Database Workbench - the developer tool for InterBase, Firebird and MS SQL Server
 
I know.

But in my particular case a user would not be a member of two similar roles which would both have execute permission to the same procedure.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top