WIP upgrade
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Simon 2024-03-06 14:28:51 +01:00
parent 7a4daaf475
commit 74f654c192
1 changed files with 14 additions and 0 deletions

View File

@ -24,6 +24,18 @@ entries:
id: invitation-enrollment-flow
model: authentik_flows.flow
### POLICIES
- attrs:
expression: |
if not regex_match(request.context.get('prompt_data').get('username'), '\s'):
return True
ak_message("Username must not contain any whitespace!")
return False
id: username-without-spaces-policy
identifiers:
name: username-without-spaces-policy
model: authentik_policies_expression.expressionpolicy
### STAGES
- identifiers:
name: invitation-stage
@ -41,6 +53,8 @@ entries:
- !Find [authentik_stages_prompt.prompt, [name, default-user-settings-field-email]]
- !Find [authentik_stages_prompt.prompt, [name, default-password-change-field-password]]
- !Find [authentik_stages_prompt.prompt, [name, default-password-change-field-password-repeat]]
validation_policies:
- !Find [ authentik_policies_expression.expressionpolicy, [name, username-without-spaces-policy]]
### STAGE BINDINGS
- identifiers: