Subject Re: [IBO] Inserting records / access privileges
Author Frank Ingermann
Hi Nico,

Nico Callewaert wrote:
> Hi List,
>
> Is there a way to check before a user inserts a record if he
(or she :-)) has enough privileges on the database to do the task ?
>

unless someone knows an easier way, try the following:

select rdb$privilege
from rdb$user_privileges
where rdb$user="MYUSER" and rdb$relation_name="MYTABLE"

the result rows will contain S (Select), U (Update), I (Unsert), D (Delete), R
(Reference) or X (eXecute procedure) for the individual rights the user has on
the table / procedure / view.

So in your case you should have an "I" in the result set...

hth,
fingerman
--
-------------------------------------------------------------------------
when parsers parse, and compilers compile, then why don't objects object?

fingerbirdy - fingerman's door to Firebird
http://www.fingerbird.de