Subject Re: [firebird-support] Re: Rights confusion with stored procedures and triggers
Author PenWin
Dne 18.5.2010 8:24, hvlad napsal(a):
> --- In firebird-support@yahoogroups.com, PenWin<penwin@...> wrote:
>
>> Now with the loggins tables, I have this sequence:
>>
>> 1) User INTERNET calls procedure INTERNET_INSERT_ROW.
>> 2) Procedure INTERNET_INSERT_ROW validates data and writes it to SOMETABLE.
>> 3) AFTER INSERT trigger LOGTRIGGER_SOMETABLE fires.
>> 4) LOGTRIGGER_SOMETABLE writes the new record from SOMETABLE to LOGTABLE.
>>
>> Unfortunately, at step #4 I am getting an error no permission for
>> insert/write access to TABLE LOGTABLE, and after a number of failed
>> attempts, I am at a loss what to do.
>
> GRANT INSERT ON LOGTABLE TO TRIGGER LOGTRIGGER_SOMETABLE

Thanks. I didn't realize you can grant rights even to triggers.

Unfortunately, I still can't get the writes to work. The only solution
that actually works involves a

GRANT INSERT ON LOGTABLE TO PUBLIC

but I would still prefer if I could prevent any direct access to any table.

Pepak