In Der Klasse befindet sich der Konstruktor:
Delphi-Quellcode:
constructor TUserAccessRights.Create;
begin
inherited Create;
// TODO: Add any constructor code here
Rights.Changable := true;
Rights.StandardUser := false;
Rights.DataBaseID := 0;
{$REGION 'SettingRightsInit'}
with Rights.ServerSetup do begin
all := true;
add := true;
edit := true;
editAccUser := true;
editAccVehicles := true;
end;
with Rights.OwnAccSetup do begin
all :=true;
add :=true;
edit :=true;
editOwnPassword :=true;
SetupUserRights :=true;
end;
with Rights.OwnJourneysSetup do begin
all :=true;
add :=true;
edit :=true;
end;
with Rights.OwnVehicleSetup do begin
all :=true;
edit :=true;
end;
with Rights.OwnAlarmsSetup do begin
all :=true;
add :=true;
edit :=true;
end;
{$ENDREGION}
{$REGION 'ViewRightsInit'}
with Rights.OwnVehiclesView do begin
all :=true;
view :=true;
end;
with Rights.OwnJourneysView do begin
all :=true;
view :=true;
viewOwn :=true;
end;
with Rights.DataView do begin
all :=true;
viewVehicleSetup :=true;
viewActuals :=true;
viewHistory :=true;
viewAlarms :=true;
end;
with Rights.Maps do begin
all :=true;
viewActuals :=true;
viewHistory :=true;
viewAlarms :=true;
Zooming :=true;
Tracing :=true;
end;
{$ENDREGION}
end;
und im Parent Object:
wird dann eben der Konstruktor aufgerufen, wie z.B:
Delphi-Quellcode:
function x : boolean
var:
OwnRights : TUserAccessRights;
begin
OwnRights:= TUserAccessRights.create;
...