pascalSCADA OPM: BasicUserManagement: Class TBasicUserManagement

Pascal SCADA OPM

Class TBasicUserManagement

Unit

BasicUserManagement

Declaration

type TBasicUserManagement = class(TComponent)

Description

TBasicUserManagement

Hierarchy

  • TComponent
  • TBasicUserManagement

Overview

Fields

Protected FLoggedUser:Boolean;
Protected FCurrentUserName:UTF8String;
Protected FCurrentUserLogin:UTF8String;
Protected FUID:Integer;
Protected FLoggedSince:TDateTime;
Protected FInactiveTimeOut:Cardinal;
Protected FLoginRetries:Cardinal;
Protected FFrozenTime:Cardinal;
Protected FVirtualKeyboardType:TVKType;
Protected FSuccessfulLogin:TNotifyEvent;
Protected FFailureLogin:TNotifyEvent;
Protected FUserChanged:TUserChangedEvent;
Protected FRegisteredSecurityCodes:TStringList;
Protected frmLogin:TpsHMIfrmUserAuthentication;
Protected frmCheckIfUserIsAllowed:TpsHMIfrmUserAuthentication;

Methods

Protected function GetLoginTime:TDateTime;
Protected procedure SetInactiveTimeOut(t:Cardinal);
Protected procedure UnfreezeLogin(Sender:TObject);
Protected function GetUID: Integer;
Protected procedure DoUserChanged; virtual;
Protected procedure DoSuccessfulLogin; virtual;
Protected procedure DoFailureLogin; virtual;
Protected function CheckUserAndPassword(User, Pass:UTF8String; var UserID:Integer; LoginAction:Boolean):Boolean; virtual;
Protected function GetLoggedUser:Boolean; virtual;
Protected function GetCurrentUserName:UTF8String; virtual;
Protected function GetCurrentUserLogin:UTF8String; virtual;
Protected function CanAccess(sc:UTF8String; aUID:Integer):Boolean; virtual; overload;
Public constructor Create(AOwner:TComponent); override;
Public destructor Destroy; override;
Public function Login:Boolean; virtual; overload;
Public function Login(Userlogin, userpassword: UTF8String; var UID: Integer):Boolean; virtual;
Public procedure Logout; virtual;
Public procedure Manage; virtual;
Public procedure ValidateSecurityCode(sc:UTF8String); virtual;
Public function SecurityCodeExists(sc:UTF8String):Boolean; virtual;
Public procedure RegisterSecurityCode(sc:UTF8String); virtual;
Public procedure UnregisterSecurityCode(sc:UTF8String); virtual;
Public function CanAccess(sc:UTF8String):Boolean; virtual;
Public function GetRegisteredAccessCodes:TStringList; virtual;
Public function CheckIfUserIsAllowed(sc: UTF8String; RequireUserLogin: Boolean; var userlogin: UTF8String): Boolean; virtual;

Properties

Protected property LoggedSince: TDateTime read GetLoginTime;
Protected property InactiveTimeout: Cardinal read FInactiveTimeOut write SetInactiveTimeOut;
Protected property LoginRetries: Cardinal read FLoginRetries write FLoginRetries;
Protected property LoginFrozenTime: Cardinal read FFrozenTime write FFrozenTime;
Protected property SuccessfulLogin: TNotifyEvent read FSuccessfulLogin write FSuccessfulLogin;
Protected property FailureLogin: TNotifyEvent read FFailureLogin write FFailureLogin;
Protected property UserChanged: TUserChangedEvent read FUserChanged write FUserChanged;
Public property UID: Integer read GetUID;
Public property UserLogged: Boolean read GetLoggedUser;
Public property CurrentUserName: UTF8String read GetCurrentUserName;
Public property CurrentUserLogin: UTF8String read GetCurrentUserLogin;

Description

Fields

Protected FLoggedUser:Boolean;
 
Protected FCurrentUserName:UTF8String;
 
Protected FCurrentUserLogin:UTF8String;
 
Protected FUID:Integer;
 
Protected FLoggedSince:TDateTime;
 
Protected FInactiveTimeOut:Cardinal;
 
Protected FLoginRetries:Cardinal;
 
Protected FFrozenTime:Cardinal;
 
Protected FVirtualKeyboardType:TVKType;
 
Protected FSuccessfulLogin:TNotifyEvent;
 
Protected FFailureLogin:TNotifyEvent;
 
Protected FUserChanged:TUserChangedEvent;
 
Protected FRegisteredSecurityCodes:TStringList;
 
Protected frmLogin:TpsHMIfrmUserAuthentication;
 
Protected frmCheckIfUserIsAllowed:TpsHMIfrmUserAuthentication;
 

Methods

Protected function GetLoginTime:TDateTime;
 
Protected procedure SetInactiveTimeOut(t:Cardinal);
 
Protected procedure UnfreezeLogin(Sender:TObject);
 
Protected function GetUID: Integer;
 
Protected procedure DoUserChanged; virtual;
 
Protected procedure DoSuccessfulLogin; virtual;
 
Protected procedure DoFailureLogin; virtual;
 
Protected function CheckUserAndPassword(User, Pass:UTF8String; var UserID:Integer; LoginAction:Boolean):Boolean; virtual;
 
Protected function GetLoggedUser:Boolean; virtual;
 
Protected function GetCurrentUserName:UTF8String; virtual;
 
Protected function GetCurrentUserLogin:UTF8String; virtual;
 
Protected function CanAccess(sc:UTF8String; aUID:Integer):Boolean; virtual; overload;
 
Public constructor Create(AOwner:TComponent); override;
 
Public destructor Destroy; override;
 
Public function Login:Boolean; virtual; overload;
 
Public function Login(Userlogin, userpassword: UTF8String; var UID: Integer):Boolean; virtual;
 
Public procedure Logout; virtual;
 
Public procedure Manage; virtual;
 
Public procedure ValidateSecurityCode(sc:UTF8String); virtual;

Security codes management

Public function SecurityCodeExists(sc:UTF8String):Boolean; virtual;
 
Public procedure RegisterSecurityCode(sc:UTF8String); virtual;
 
Public procedure UnregisterSecurityCode(sc:UTF8String); virtual;
 
Public function CanAccess(sc:UTF8String):Boolean; virtual;
 
Public function GetRegisteredAccessCodes:TStringList; virtual;
 
Public function CheckIfUserIsAllowed(sc: UTF8String; RequireUserLogin: Boolean; var userlogin: UTF8String): Boolean; virtual;
 

Properties

Protected property LoggedSince: TDateTime read GetLoginTime;

read only properties.

Protected property InactiveTimeout: Cardinal read FInactiveTimeOut write SetInactiveTimeOut;

read-write properties. property VirtualKeyboardType:TVKType read FVirtualKeyboardType write FVirtualKeyboardType;

Protected property LoginRetries: Cardinal read FLoginRetries write FLoginRetries;
 
Protected property LoginFrozenTime: Cardinal read FFrozenTime write FFrozenTime;
 
Protected property SuccessfulLogin: TNotifyEvent read FSuccessfulLogin write FSuccessfulLogin;
 
Protected property FailureLogin: TNotifyEvent read FFailureLogin write FFailureLogin;
 
Protected property UserChanged: TUserChangedEvent read FUserChanged write FUserChanged;
 
Public property UID: Integer read GetUID;

read only properties.

Public property UserLogged: Boolean read GetLoggedUser;
 
Public property CurrentUserName: UTF8String read GetCurrentUserName;
 
Public property CurrentUserLogin: UTF8String read GetCurrentUserLogin;
 

Generated by PasDoc 0.14.0.