summaryrefslogtreecommitdiffstats
path: root/app/authentication.go
diff options
context:
space:
mode:
Diffstat (limited to 'app/authentication.go')
-rw-r--r--app/authentication.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/authentication.go b/app/authentication.go
index 809c2e6c7..91e3bf564 100644
--- a/app/authentication.go
+++ b/app/authentication.go
@@ -11,6 +11,13 @@ import (
"github.com/mattermost/mattermost-server/utils"
)
+func (a *App) IsPasswordValid(password string) *model.AppError {
+ if utils.IsLicensed() && *utils.License().Features.PasswordRequirements {
+ return utils.IsPasswordValidWithSettings(password, &a.Config().PasswordSettings)
+ }
+ return utils.IsPasswordValid(password)
+}
+
func (a *App) CheckPasswordAndAllCriteria(user *model.User, password string, mfaToken string) *model.AppError {
if err := a.CheckUserAdditionalAuthenticationCriteria(user, mfaToken); err != nil {
return err