Subject | RE: [firebird-support] ADD GRANT TO PROCEDURE |
---|---|
Author | Alan McDonald |
Post date | 2005-10-13T13:22:26Z |
> I use this PROCEDURE to add new user.you're not adding this user to security database - so what's the purpose of
> I like to add GRANT statment to this PROCEDURE. (GRANT SELECT,
> UPDATE ON TBLCUST TO USER TBLCUST.CID;)
> How can I do? I am using firebird 1.5.3
>
> /* ------------------------------------------------------------ */
> CREATE PROCEDURE ADD_NEW_USER (
> CID CHAR (8) CHARACTER SET WIN1251,
> CNAME CHAR (30) CHARACTER SET WIN1251,
> CPHONE CHAR (10) CHARACTER SET WIN1251,
> CEMAIL CHAR (30) CHARACTER SET WIN1251,
> CPSW CHAR (8) CHARACTER SET WIN1251)
> AS
>
> BEGIN
> BEGIN
> INSERT INTO TBLCUST (CID, CNAME,CPHONE,CEMAIL,CPSW) VALUES
> (:CID, :CNAME,:CPHONE,:CEMAIL,:CPSW);
> END
> SUSPEND;
> END
> /* ------------------------------------------------------------ */
granting to this user?
if you added a user to the security database, then you need to issue a grant
statement like a normal query.
If you are rolling your own security, then you need to roll your own grant
mechanism
Alan