Page 1 of 1

SecurityService DisplayUser(), DeleteUser() not working

Posted: Wed 13 May 2009 14:56
by Realtime
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

Posted: Thu 14 May 2009 07:29
by Plash
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;

Posted: Thu 14 May 2009 08:23
by Realtime
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.