unit abNewUserDlg;

interface

uses Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls,
  Buttons, ExtCtrls, ActnList;

type
  TdlgNewUser = class(TForm)
    OKBtn: TButton;
    CancelBtn: TButton;
    lblNewUserName: TLabel;
    edtNewUserName: TEdit;
    ActionList1: TActionList;
    actOK: TAction;
    procedure actOKUpdate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;


implementation

{$R *.DFM}
uses abDlgSecurity, abSecurity;

procedure TdlgNewUser.actOKUpdate(Sender: TObject);
begin
  TAction(Sender).Enabled := (length(edtNewUserName.Text) > 0) and
                              (not Assigned(TabSecurityTemplate(TfrmSecurity(Owner).ftvUserTemplate).GetUserNodeByUserName(edtNewUserName.Text)));
end;

end.
