diff --git a/Source/ApplicationBase/ApplicationBase.dproj b/Source/ApplicationBase/ApplicationBase.dproj
index c797904a..462eab2b 100644
--- a/Source/ApplicationBase/ApplicationBase.dproj
+++ b/Source/ApplicationBase/ApplicationBase.dproj
@@ -52,20 +52,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
VCL for the Web Design Package for CodeGear RAD Studio
CodeGear WebSnap Components
@@ -81,12 +67,12 @@
MainSource
-
-
-
-
-
-
+
+
+
+
+
+
@@ -174,22 +160,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
TCustomEditor
diff --git a/Source/ApplicationBase/Usuarios/Controller/uUsuariosController.pas b/Source/ApplicationBase/Usuarios/Controller/uUsuariosController.pas
index 74f86b35..6f4e9b02 100644
--- a/Source/ApplicationBase/Usuarios/Controller/uUsuariosController.pas
+++ b/Source/ApplicationBase/Usuarios/Controller/uUsuariosController.pas
@@ -63,6 +63,10 @@ type
function GetCriptografia : TUCCriptografia;
property Criptografia: TUCCriptografia read GetCriptografia;
+ function GetUsarPasswordsSeguras: Boolean;
+ procedure SetUsarPasswordsSeguras(const Value: Boolean);
+ property UsarPasswordsSeguras : Boolean read GetUsarPasswordsSeguras write SetUsarPasswordsSeguras;
+
{
procedure ChangePassword(IDUser: Integer; NewPassword: String);
procedure AddRight(idUser: Integer; ItemRight: TObject; FullPath: Boolean = True); overload;
@@ -86,6 +90,7 @@ type
FDataModule : IDataModuleUsuarios;
FUserControl: TUserControl;
FCurrentUser : IBizUsuario;
+ FUsarPasswordsSeguras : Boolean;
function GetMaxIntentosLogin: Integer;
procedure SetMaxIntentosLogin(const Value: Integer);
@@ -109,6 +114,9 @@ type
function GetCriptografia : TUCCriptografia;
function CambiarPassword(const AIDUser: Integer; const ANewPassword: String): Boolean; overload;
+
+ function GetUsarPasswordsSeguras: Boolean;
+ procedure SetUsarPasswordsSeguras(const Value: Boolean);
public
constructor Create; virtual;
destructor Destroy; override;
@@ -153,6 +161,7 @@ type
function ValidarPassword(const APassword : string; const ALogin : String;
const ANombre: String; out AMsg : String): boolean;
+ property UsarPasswordsSeguras : Boolean read GetUsarPasswordsSeguras write SetUsarPasswordsSeguras;
property UserControl : TUserControl read FUserControl;
property MaxIntentosLogin : Integer read GetMaxIntentosLogin write SetMaxIntentosLogin;
property CurrentUser: IBizUsuario read GetCurrentUser;
@@ -343,6 +352,7 @@ begin
AsignarDataModule;
FCurrentUser := NIL;
FUserControl := TUserControl.Create(nil);
+ FUsarPasswordsSeguras := False;
InicializarUserControl;
end;
@@ -487,10 +497,11 @@ end;
function TUsuariosController.GetCurrentUser: IBizUsuario;
begin
if not Assigned(FCurrentUser) or (FCurrentUser.ID <> FUserControl.CurrentUser.UserID) then
- begin
FCurrentUser := BuscarUsuario(FUserControl.CurrentUser.UserID);
- FCurrentUser.DataTable.Active := True;
- end;
+
+ if not FCurrentUser.Active then
+ FCurrentUser.Active := True;
+
Result := FCurrentUser;
end;
@@ -499,6 +510,11 @@ begin
Result := FUserControl.Login.MaxLoginAttempts;
end;
+function TUsuariosController.GetUsarPasswordsSeguras: Boolean;
+begin
+ Result := FUsarPasswordsSeguras;
+end;
+
function TUsuariosController.GuardarPerfil(APerfil: IBizPerfilUsuario): Boolean;
begin
Result := False;
@@ -660,6 +676,11 @@ begin
FUserControl.Login.MaxLoginAttempts := Value;
end;
+procedure TUsuariosController.SetUsarPasswordsSeguras(const Value: Boolean);
+begin
+ FUsarPasswordsSeguras := Value;
+end;
+
procedure TUsuariosController._ShowChangePassword;
begin
FUserControl.ShowChangePassword;
@@ -686,7 +707,7 @@ begin
if (Length(Trim(APassword)) < FUserControl.UserPasswordChange.MinPasswordLength) then
AMsg := Format(FUserControl.UserSettings.CommonMessages.ChangePasswordError.MinPasswordLength, [FUserControl.UserPasswordChange.MinPasswordLength])
else
- if Pos(LowerCase(APassword), 'abcdeasdfqwerzxcv1234567890321654987test' + LowerCase(ALogin) + LowerCase(AMsg)) > 0 then
+ if FUsarPasswordsSeguras and (Pos(LowerCase(APassword), 'abcdeasdfqwerzxcv1234567890321654987test' + LowerCase(ALogin) + LowerCase(AMsg)) > 0) then
AMsg := FUserControl.UserSettings.CommonMessages.ChangePasswordError.InvalidNewPassword
else
Result := true;
@@ -876,8 +897,8 @@ begin
end;
procedure TUsuariosController.FiltrarEmpresa(AUsuario: IBizUsuario);
-{var
- Condicion: TDAWhereExpression;}
+var
+ Condicion: TDAWhereExpression;
begin
// AQUI HAY QUE TENER EN CUENTA QUE UN USUARIO PUEDE QUE NO TENGA ACCESO
@@ -901,4 +922,4 @@ begin
end;
-end.
\ No newline at end of file
+end.