You are not logged in.
i created inheriting class from TSQLAuthUser
TSQLUser = class(TSQLAuthUser)
private
fMO: TSQLMO;
fRole: TUserRole;
fMOReadOnly: Integer;
fDateB, fDateE: TDateTime;
published
property MO: TSQLMO read fMO write fMO;
property Role: TUserRole read fRole write fRole;
property MOReadOnly: Integer read fMOReadOnly write fMOReadOnly;
property DateB: TDateTime read fDateB write fDateB;
property DateE: TDateTime read fDateE write fDateE;
end;
and add it to model
Result := TSQLModel.Create([TSQLAuthGroup, TSQLUser, ... ]);
in auth i have code
if not ClientRest.SetUser(login, password) then Exit;
u := TSQLUser.Create(ClientRest, 'LogonName = ? and Date(DateE) is Null', [login]);
try
if u.ID <> 0 then begin
...
finally
u.Free;
end;
if GroupRights of auth client = 2 (supervisor) all ok - supervisor have right to read AuthUser table, but if i set GroupRights = 3 (user) not have permission.
i try
u := TSQLUser(ClientRest.SessionUser);
but in this case i not have all additional TSQLUSER fields (MO, Role, MOReadOnly, DateB, DateE)
how can i get additional TSQLUSER fields from class inheriting from TSQLAuthUser?
Offline