From 482491e93cae60ba5781f5002151612ffefc8096 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Tue, 24 May 2022 19:40:54 +0200 Subject: [PATCH] core: fix username validator not allowing changes that can be done via flows closes #2755 Signed-off-by: Jens Langhammer --- authentik/core/api/users.py | 1 + schema.yml | 9 --------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/authentik/core/api/users.py b/authentik/core/api/users.py index 1caceb998..0f911bd30 100644 --- a/authentik/core/api/users.py +++ b/authentik/core/api/users.py @@ -72,6 +72,7 @@ class UserSerializer(ModelSerializer): ) groups_obj = ListSerializer(child=GroupSerializer(), read_only=True, source="ak_groups") uid = CharField(read_only=True) + username = CharField(max_length=150) class Meta: diff --git a/schema.yml b/schema.yml index 332a309a8..ccb18428f 100644 --- a/schema.yml +++ b/schema.yml @@ -28395,9 +28395,6 @@ components: username: type: string minLength: 1 - description: Required. 150 characters or fewer. Letters, digits and @/./+/-/_ - only. - pattern: ^[\w.@+-]+$ maxLength: 150 name: type: string @@ -30942,9 +30939,6 @@ components: title: ID username: type: string - description: Required. 150 characters or fewer. Letters, digits and @/./+/-/_ - only. - pattern: ^[\w.@+-]+$ maxLength: 150 name: type: string @@ -31254,9 +31248,6 @@ components: username: type: string minLength: 1 - description: Required. 150 characters or fewer. Letters, digits and @/./+/-/_ - only. - pattern: ^[\w.@+-]+$ maxLength: 150 name: type: string