Correct password check

This commit is contained in:
Hillel Coren 2020-10-04 13:47:17 +03:00
parent ff0e364fe7
commit ffd6fc2c83
2 changed files with 6 additions and 12 deletions

View File

@ -409,9 +409,9 @@ abstract class CompanyEntity extends Object
);
bool isModuleEnabled(EntityType entityType) {
/*
// TODO remove this
if ([
EntityType.recurringInvoice,
EntityType.project,
EntityType.task,
EntityType.expense,
@ -419,7 +419,6 @@ abstract class CompanyEntity extends Object
].contains(entityType)) {
return false;
}
*/
if ((entityType == EntityType.invoice ||
entityType == EntityType.payment) &&
@ -634,18 +633,9 @@ abstract class UserCompanyEntity
return true;
}
/*
// TODO remove this once task/expenses are supported
if (!Config.DEMO_MODE &&
[
EntityType.vendor,
EntityType.expense,
EntityType.task,
EntityType.project,
].contains(entityType)) {
if (!company.isModuleEnabled(entityType)) {
return false;
}
*/
if (isAdmin ?? false) {
return true;

View File

@ -60,6 +60,10 @@ class _PasswordFormFieldState extends State<PasswordFormField> {
: localization.pleaseEnterYourPassword;
}
if (!widget.newPassword) {
return null;
}
if (value.length < 8) {
return localization.passwordIsTooShort;
}