Subject Re: PROBLEMS WITH GRANT & REVOKE
Author robjimwilliams
--- In ib-support@y..., Helen Borrie <helebor@t...> wrote:
> At 05:13 PM 05-09-02 +0000, you wrote:
> >I'm new to client server and Interbase.
> >
> >I'm having problems with grant and revoke running IB6. What I want
> >to do is grant a user SELECT, INSERT and UPDATE but not DELETE.
I've
> >tried the following:
> >
> >GRANT
> > SELECT,
> > INSERT,
> > UPDATE
> >ON CUSTS TO ROBERT;
>
> This looks right. Did you commit it?

WHAT'S COMMITTING? How do I commit? I'm sure I didn't commit.

>
>
> >ALSO
> >
> >GRANT
> > ALL
> >ON CUSTS TO ROBERT;
> >
> >and then did
> >
> >REVOKE
> > DELETE
> >ON CUSTS TO ROBERT;
>
> This won't work. You can only revoke what has been explicitly
GRANTed. So
> you can revoke ALL but you can't pick out the "bits" and revoke
them one by
> one.
>
> Note that each statement's effect, if valid, will stay in place
until you
> revoke it explicitly.
>
> It bemuses me somewhat that (from your description here) revoking
DELETE
> appeared to have caused a revoke on ALL. AFAIK, your REVOKE on
DELETE
> should have done nothing to affect either the first or the
second...were
> you logged in as SYSDBA or Owner when submitting these GRANT/REVOKE
statements?

Indeed yes logged in as SYSDBA

>
> >Either way I get the same result. The interface (written in
Delphi)
> >behaves as if I had also REVOKEd INSERT and UPDATE, although when
you
> >look at the permissions on the table INSERT AND UPDATE are both
> >selected - WHAT am I doing wrong??
>
> How are you submitting this DDL? This could be a problem with
either the
> interface you are using to install the privileges or a fault in the
> interface you are using in the client; or that there is an
uncommitted
> transaction around somewhere....
>

Probably uncommitted transactions - how do I commit?

I am using the console application IBConsole. I appeared to allow me
to INSERT, UPDATE and SELECT fine. I connected through my Delphi
application fine with the caveats. I had to allow all users to do
everything though or I got the same behaviour (ie GRANT ALL ...)
which I felt rather defeated the object!


> What happens if you submit your SELECT/INSERT/UPDATE statements
through
> your admin tool while logged in as ROBERT?

Behaviour as described - if I GRANT ALL I can do everything. If I
REVOKE DELETE all I can do is SELECT.
>
> heLen

Thanks

Robert Williams.