You are not logged in.
Pages: 1
Could SessionCreate in mORMot.pas be changed to return also the user's group id? I'm using an ajax client and want to adjust the UI depending on group.
Changing line 43821 seems the simplest way:
procedure TSQLRestServerAuthentication.SessionCreate(Ctxt: TSQLRestServerURIContext;
var User: TSQLAuthUser);
var Session: TAuthSession;
begin
if User<>nil then
try // now client is authenticated -> create a session
fServer.SessionCreate(User,Ctxt,Session); // call Ctxt.AuthenticationFailed on error
if Session<>nil then
// CHANGED LINE 43821:
Ctxt.Returns(['result',Session.fPrivateSalt,'logonname',Session.User.LogonName,'groupid',Session.User.GroupRights.ID]);
finally
User.Free;
end;
end;
Offline
Please try http://synopse.info/fossil/info/d3cf8d32bb
Offline
Many thanks
Offline
Pages: 1