RequestAuth

<< Click to Display Table of Contents >>

Navigation:  Classes > TIWAppForm > Methods >

RequestAuth

Override this class procedure to inform if authorization will be requested when the form is to be rendered if Authorization is active in your application.

 

SIGNATURE=IWAppForm.TIWAppForm.RequestAuth@THttpRequest@string

 

ETYPE=Method

 

Declaration:

Delphi:

public class function RequestAuth(aRequest: THttpRequest; var rGroup: string): Boolean; virtual;

C++:

public: virtual __fastcall bool RequestAuth(THttpRequest aRequest, String rGroup);

 

Description: This is RequestAuth, a member of class TIWAppForm.

 

 

 TfrmNewItem = class(TIWAppForm)

   ...

 public

   class function RequestAuth(aRequest: TWebRequest; var rGroup: string): Boolean; override;

 end;

 

   ...

 

class function TfrmNewItem.RequestAuth(aRequest: TWebRequest; var rGroup: string): Boolean;

begin

 // this will make the app request authorization, if no user is logged in

 Result := not Assigned(UserSession.CurrentUser);

end;