Compare commits
1 Commits
main
...
validate-u
Author | SHA1 | Date |
---|---|---|
Simon | 00608c1143 |
|
@ -24,6 +24,24 @@ entries:
|
|||
id: invitation-enrollment-flow
|
||||
model: authentik_flows.flow
|
||||
|
||||
### POLICIES
|
||||
- attrs:
|
||||
expression: "if not regex_match(request.context.get('prompt_data').get('username'),\
|
||||
\ '\\s'):\n return True\n\nak_message(\"Username must not contain\
|
||||
\ whitespace!\")\nreturn False"
|
||||
name: username-without-spaces-policy
|
||||
id: username-without-spaces-policy
|
||||
identifiers:
|
||||
name: username-without-spaces-policy
|
||||
model: authentik_policies_expression.expressionpolicy
|
||||
|
||||
### POLICY BINDINGS
|
||||
- identifiers:
|
||||
policy: !KeyOf username-without-spaces-policy
|
||||
target: !KeyOf prompt-stage-binding
|
||||
order: 10
|
||||
model: authentik_policies.policybinding
|
||||
|
||||
### STAGES
|
||||
- identifiers:
|
||||
name: invitation-stage
|
||||
|
@ -53,6 +71,7 @@ entries:
|
|||
stage: !KeyOf enrollment-prompt-userdata
|
||||
target: !KeyOf invitation-enrollment-flow
|
||||
model: authentik_flows.flowstagebinding
|
||||
id: prompt-stage-binding
|
||||
- identifiers:
|
||||
order: 20
|
||||
stage: !Find [authentik_stages_user_write.userwritestage, [name, default-source-enrollment-write]]
|
||||
|
|
|
@ -69,3 +69,16 @@ entries:
|
|||
attrs:
|
||||
label: !Context transl_username
|
||||
placeholder: !Context transl_username
|
||||
|
||||
### POLICIES
|
||||
- model: authentik_policies_expression.expressionpolicy
|
||||
identifiers:
|
||||
name: username-without-spaces-policy
|
||||
attrs:
|
||||
expression: "if not regex_match(request.context.get('prompt_data').get('username'),\
|
||||
\ '\\s'):\n return True\n\nak_message(\"Benutzername darf kein Leerzeichen\
|
||||
\ enthalten\")\nreturn False"
|
||||
name: username-without-spaces-policy
|
||||
id: username-without-spaces-policy
|
||||
|
||||
Benutzername darf kein Leerzeichen enthalten\")\n
|
Loading…
Reference in New Issue