SecurityService DisplayUser(), DeleteUser() not working

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Realtime
Posts: 6
Joined: Thu 19 Mar 2009 15:21

SecurityService DisplayUser(), DeleteUser() not working

Post by Realtime » Wed 13 May 2009 14:56

I am using the new TIBCSecurityService with RAD Studio 2009 and Firebird 2.1.2 Server.

What is working:
With the methode AddUser() and a preset UserInfo I can add users to the Database.

What is NOT working:
DisplayUser( "TEST80" ) does not fill UserInfo with data.

DeleteUser() with a UserInfo.UserName set returns the error "User not found"

What is the correct usage of DisplayUser() and DeleteUser()?

What actions must be taken when: active = true, attach, set UserInfo, DisplayUser(),....

Is there somewhere some example code?

Or is there a bug in the beta?

Christian

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Thu 14 May 2009 07:29

There are two properties: UserInfo and UserInfos.

The DisplayUser method fills the UserInfos indexed property:

Code: Select all

  IBCSecurityService1.Attach;
  IBCSecurityService1.DisplayUser('sysdba');
  IBCSecurityService1.UserInfos[0];
AddUser, ModifyUser, and DeleteUser uses the UserInfo property:

Code: Select all

  IBCSecurityService1.Attach;
  with IBCSecurityService1.UserInfo do begin
    UserName := 'user1';
    Password := 'user1';
  end;
  IBCSecurityService1.AddUser;
  IBCSecurityService1.DeleteUser;

Realtime
Posts: 6
Joined: Thu 19 Mar 2009 15:21

Post by Realtime » Thu 14 May 2009 08:23

Thanks for the reply.

When accessing the SecurityService as SYSDBA, all (adding, deleting) works fine.

It looks like I have problems when a non-SYSDBA user wants query or delete other users. Only adding users works fine.

With FB 1.5, this worked, FB2.x seems to have some additional security restrictions.

Post Reply