From c35550218191bd28e2acf8e22e89141902e542bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E4=BD=A9=E7=8F=8A=5Bshiisa=5D?= Date: Fri, 25 Aug 2023 15:21:58 +0800 Subject: [PATCH] feat: create data_source user #1154 --- src/bk-user/bkuser/biz/validators.py | 4 +++- src/bk-user/poetry.lock | 17 ++++++++++++++++- src/bk-user/pyproject.toml | 1 + 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/bk-user/bkuser/biz/validators.py b/src/bk-user/bkuser/biz/validators.py index bb8eda40a..2d6ee1a33 100644 --- a/src/bk-user/bkuser/biz/validators.py +++ b/src/bk-user/bkuser/biz/validators.py @@ -27,4 +27,6 @@ def validate_tenant_id(value): def validate_data_source_user_username(value): if not re.fullmatch(re.compile(DATA_SOURCE_USERNAME_REGEX), value): - raise ValidationError(_("{} 不符合 用户名 的命名规范: 由3-32位字母、数字、下划线(_)、点(.)、连接符(-)字符组成,以字母开头").format(value)) # noqa: E501 + raise ValidationError( + _("{} 不符合 用户名 的命名规范: 由3-32位字母、数字、下划线(_)、点(.)、连接符(-)字符组成,以字母开头").format(value), # noqa: E501 + ) diff --git a/src/bk-user/poetry.lock b/src/bk-user/poetry.lock index dcd3523b9..52db1ebe9 100644 --- a/src/bk-user/poetry.lock +++ b/src/bk-user/poetry.lock @@ -3208,7 +3208,22 @@ type = "legacy" url = "https://mirrors.tencent.com/pypi/simple" reference = "tencent" +[[package]] +name = "zxcvbn" +version = "4.4.28" +description = "" +optional = false +python-versions = "*" +files = [ + {file = "zxcvbn-4.4.28.tar.gz", hash = "sha256:151bd816817e645e9064c354b13544f85137ea3320ca3be1fb6873ea75ef7dc1"}, +] + +[package.source] +type = "legacy" +url = "https://mirrors.tencent.com/pypi/simple" +reference = "tencent" + [metadata] lock-version = "2.0" python-versions = ">=3.10,<3.11" -content-hash = "6684a59ced285a62b35d0553f8e829a197ed46514b7f0c5d806b4cc906928c9f" +content-hash = "8d2dea6fd6646b10c1a912c4a5a788ff554ccd9a3ebbb2855cfc68ef2f3872b0" diff --git a/src/bk-user/pyproject.toml b/src/bk-user/pyproject.toml index ca01df311..8fb31a02e 100644 --- a/src/bk-user/pyproject.toml +++ b/src/bk-user/pyproject.toml @@ -44,6 +44,7 @@ opentelemetry-instrumentation-celery = "0.40b0" redis = "4.6.0" django-redis = "5.3.0" pydantic = "2.1.1" +zxcvbn = "4.4.28" phonenumbers = "8.13.18" [tool.poetry.group.dev.dependencies]