Subject | Re: [firebird-support] > Hi, > > I have a stored procedure, which is inserting/deleting some records fo |
---|---|
Author | Michael Ludwig |
Post date | 2010-05-24T12:00:58Z |
ardatun schrieb am 24.05.2010 um 11:25:55 (-0000):
the user, like in this example:
SQL> show grant;
/* Grant permissions for this database */
GRANT INSERT ON PERM_LOG TO TRIGGER PERM_TRG
GRANT INSERT ON PERM_TBL TO PROCEDURE PERM_PROC
GRANT GURKO TO GURKI
GRANT EXECUTE ON PROCEDURE PERM_PROC TO ROLE GURKO
GURKI is a user here, who has been granted the GURKO role, which has
been granted EXECUTE on the procedure, which has been granted INSERT
on the table.
So for your case:
GRANT DELETE, INSERT ON SomeTable TO PROCEDURE sp_insert_records
--
Michael Ludwig
> I don't want this user to do anything else in the database other thanNo, you need to give the appropriate privileges to the procedure, not to
> just executing the stored procedure.
>
> But, because the stored procedure is inserting/deleting records to
> some tables, I need to give insert/delete grants to user5 for that
> tables.
the user, like in this example:
SQL> show grant;
/* Grant permissions for this database */
GRANT INSERT ON PERM_LOG TO TRIGGER PERM_TRG
GRANT INSERT ON PERM_TBL TO PROCEDURE PERM_PROC
GRANT GURKO TO GURKI
GRANT EXECUTE ON PROCEDURE PERM_PROC TO ROLE GURKO
GURKI is a user here, who has been granted the GURKO role, which has
been granted EXECUTE on the procedure, which has been granted INSERT
on the table.
So for your case:
GRANT DELETE, INSERT ON SomeTable TO PROCEDURE sp_insert_records
--
Michael Ludwig