Subject | RE: [IBO] IB User-security with IBO |
---|---|
Author | Sergey Mitrushkin |
Post date | 2001-08-02T22:42:01Z |
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@...
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-----ist.com]On Behalf Of Martijn Hoedeman
> From:
> sentto-402930-9268-996756396-com=geo.chita.ru@...
> [mailto:sentto-402930-9268-996756396-com=geo.chita.ru@...
> 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/
>
>
>
>