Files
grecia/config/initializers
taitus fe9da7988f Enable password_complexity
As it seems that adding complexity to the password is something that
might be wanted from the Consul applications, we added the necessary
changes to allow it.

In this version we simply:
- Uncomment the configuration variable "password_complexity"
- Set this variable without any restrictions
- Adapt the application so that everything still works normally.

One of the things that had to be done to adapt the application
was to remove the overwriting of the "self.included" method.

The original idea of overwriting the "self.included" method seems
to be the possibility of being able to overwrite the
:current_equal_password_validation validation.
The problem comes from the fact that by only calling that validation,
the rest of the validations that are defined (in this case
"password_complexity") are no longer applied.

It seems like a good idea to remove the overwrite of the "self.included"
method to allow all the defined validations to be applied and simply
overwrite the :current_equal_password_validation method so that
everything behaves the same.

:allow_passwords_equal_to_email configuration has been enabled too,
in order to allow existing records with this configuration.

Another change made was to uncomment the line:
and to keep everything working the same set the value to false:
config.email_validation = false.

This change has had to be made because in the documentation of
devise-security it says the following:
In other words, if we want to use the :secure_validatable module
we have to enable this configuration even if its value is "false".

If we kept the configuration variable commented out:
The following error appears:
"uninitialized constant Devise::Models::SecureValidatable::EmailValidator".

So it has been verified that if before making any change we
decommented the line and added the value of "false", the application
worked as normal.
2023-10-24 18:59:03 +02:00
..
2021-08-15 01:26:29 +02:00
2023-09-11 23:40:37 +02:00
2020-06-16 13:47:38 +02:00
2019-04-16 17:28:06 +02:00
2023-10-24 18:59:03 +02:00
2020-12-02 12:13:02 +01:00
2017-04-03 12:30:57 +02:00
2015-07-15 13:32:13 +02:00
2023-09-11 23:40:37 +02:00
2023-09-11 23:40:37 +02:00
2019-04-16 17:28:06 +02:00