feat: configure Kanban login by operator email
All checks were successful
Build and deploy / Validate source (push) Successful in 13s
Build and deploy / Publish images and notify Portainer (push) Successful in 1m2s

This commit is contained in:
Cauê Faleiros
2026-09-18 12:54:04 -03:00
parent 9d348ca893
commit 508fa03664
14 changed files with 59 additions and 48 deletions

View File

@@ -88,9 +88,17 @@ class Login(StrictModel):
password: str = Field(min_length=1, max_length=128)
class OperatorLogin(StrictModel):
username: str = Field(min_length=1, max_length=100)
email: str = Field(min_length=3, max_length=254)
password: str = Field(min_length=1, max_length=128)
@field_validator('email')
@classmethod
def operator_email_valid(cls, value):
value = value.strip().lower()
if not re.fullmatch(r'[^\s@]+@[^\s@]+\.[a-zA-Z]{2,}', value):
raise ValueError('Invalid email')
return value
class FileReference(StrictModel):
upload_id: UUID
item_index: int = Field(ge=0, strict=True)