feat: add invited_by attribute
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
cellarspoon 2022-01-10 09:40:16 +01:00
parent e347b1eed1
commit 3138a2964f
No known key found for this signature in database
GPG Key ID: 03789458B3D0C410
2 changed files with 5 additions and 0 deletions

View File

@ -58,7 +58,9 @@ def form_keycloak_register(
username: str = Form(...),
email: str = Form(...),
password: str = Form(...),
invited_by: str = Form(...),
):
payload = {
"email": email,
"username": username,
@ -74,6 +76,7 @@ def form_keycloak_register(
"realmRoles": [
"user_default",
],
"attributes": {"invited_by": username},
}
try:

View File

@ -20,6 +20,8 @@
<label for="password">Password:</label>
<input type="password" name="password" />
<input type="hidden" name="invited_by" value="{{ username }}"/>
<input type="submit" />
</form>