#1 2015-09-04 18:38:00

nostroyo
Member
Registered: 2015-08-19
Posts: 16

Adding User on server

Hi,
I try to add a user on the server with this code :

  LStandardAppliUser := TSQLAuthUser.Create;
  LStandardAppliUser.LogonName := 'StdUser';
  LStandardAppliUser.PasswordPlain := 'Efficaps';
  FServer.Add(LStandardAppliUser, False);

But when i try to set a session with this user on the client side :

    FModel := TSQLModel.Create([]);
    FHttpClient := TSQLHttpClient.Create('LOCALHOST', PORT_NAME, FModel);
    FHttpClient.SetUser('StdUser','Efficaps');

I've got a forbidden error. How can i add a user even in designtime?

Offline

#2 2015-09-04 18:44:51

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,231
Website

Re: Adding User on server

As documented, you need to set the Group of the user.
Your user has its Group set to 0, so even if authenticated, there is no right associated to it.

See http://synopse.info/files/html/Synopse% … #TITLE_502

Offline

Board footer

Powered by FluxBB