Subject Re: [IBO] IB User-security with IBO
Author Dmitry Beloshistov
----- Original Message -----
From: "Martijn Hoedeman" <m.hoedeman@...>
To: <IBObjects@yahoogroups.com>
Sent: Thursday, August 02, 2001 3:45 PM
Subject: [IBO] IB User-security with IBO


> Hi all,
>
> One small detail which I couldn't find either in IBO or in the
newsgroup-archive, is the handling of user-security.
>
> Say a certain user only has read-access(Or no access whatsoever) to a
IB-table while others have full access.
> What would be a good way to check & handle this on the client-side?
>
> One method would be to read the database yourself (RDB$USER_PRIVILEGES I
think it is) but then you would have to do this with almost every screen and
it just feels like a waste of resource.
>
> When I started I (wrongly) assumed that IBO would check the current rights
in the database and adjust the controls accordingly. In case of the user
with only read-access the components would not switch to edit-mode. But when
I use a TIB_Query to access the table (And generate the Insert/Update/Delete
SQL) it raises exceptions in case of too little rights.
>
> I just have the feeling that there is an easier way to handle/access
IB-rights on the client using IBO*

Or different way (see previos):
........
if not CheckGrant('GRANTEDTABLE','U') then
begin
IB_Grid1.ReadOnly:=True;
IB_UpdateBar1.Visible:=False; // if you use TIB_UpdateBar....
end;
........

WBR, Dmitry Beloshistov AKA [-=BDS=-]
e-mail: torin@...