Subject Betr.: RE: [IBO] IB User-security with IBO
Author Martijn Hoedeman
Many thanks everybody for the responses :-)

Although I really like nick's idea for setting up a LDAP server (would love to hear more about this*) I think it's a little out of my client's league.

For now I'm going with the stored-procedure solution (as soon as they get rid of that nasty IB-Novell server and I can start using stored procedures*)

Regards,
Martijn Hoedeman
OPG-Medico B.V.


>>> "Sergey Mitrushkin" <com@...> 03-08-01 00:42 >>>
i use the simple way to solve this problem:

procedure TMainDm.QueryError(Sender: TObject; const ERRCODE: Integer;
ErrorMessage, ErrorCodes: TStringList; const SQLCODE: Integer;
SQLMessage, SQL: TStringList; var RaiseException: Boolean);
begin
case ERRCODE of
335544352: begin // insufficiently rights
RaiseException := False;
if (Sender is TIB_Query) then
try
TIB_Query(Sender).Close;
TIB_Query(Sender).InsertSQL.Clear;
TIB_Query(Sender).EditSQL.Clear;
TIB_Query(Sender).DeleteSQL.Clear;
TIB_Query(Sender).Open;
except
RaiseException := True;
end;
end;
end;
end;

and no more! no additional code is needed to manage user rights in app
=========
Sergey Mitrushkin
com@...


> -----Original Message-----
> From:
> sentto-402930-9268-996756396-com=geo.chita.ru@...
> [mailto:sentto-402930-9268-996756396-com=geo.chita.ru@...
ist.com]On Behalf Of Martijn Hoedeman
> Sent: Thursday, August 02, 2001 10:46 PM
> To: IBObjects@yahoogroups.com
> 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*
>
> Any help / Pointers welcome
> Cheers
> Martijn Hoedeman
>
>
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
>






Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/