Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
fix: password rotation checks (#17194)
boojack9d9ae4f2489e
diff --git a/backend/api/v1/auth_service.go b/backend/api/v1/auth_service.goindex 1a8b12f8a4..76184ecaa3 100644--- a/backend/api/v1/auth_service.go+++ b/backend/api/v1/auth_service.go@@ -235,12 +235,12 @@ func (s *AuthService) needResetPassword(ctx context.Context, user *store.UserMesreturn count > 1}- if passwordRestriction.PasswordRotation != nil && passwordRestriction.PasswordRotation.GetNanos() > 0 {+ if passwordRestriction.PasswordRotation != nil {lastChangePasswordTime := user.CreatedAtif user.Profile.LastChangePasswordTime != nil {lastChangePasswordTime = user.Profile.LastChangePasswordTime.AsTime()}- if lastChangePasswordTime.Add(time.Duration(passwordRestriction.PasswordRotation.GetNanos())).Before(time.Now()) {+ if lastChangePasswordTime.Add(passwordRestriction.PasswordRotation.AsDuration()).Before(time.Now()) {return true}}