Compare commits
2 Commits
31b2257502
...
83a02d69d4
Author | SHA1 | Date | |
---|---|---|---|
83a02d69d4 | |||
a97a19d134 |
@ -10,7 +10,7 @@ KEYCLOAK_DOMAIN=login.lumbung.space
|
|||||||
KEYCLOAK_REALM=lumbung-space
|
KEYCLOAK_REALM=lumbung-space
|
||||||
LETS_ENCRYPT_ENV=production
|
LETS_ENCRYPT_ENV=production
|
||||||
NEXTCLOUD_API_BASE_URL=cloud.lumbung.space
|
NEXTCLOUD_API_BASE_URL=cloud.lumbung.space
|
||||||
NEXTCLOUD_APP_PASSWORD=fizzbang
|
NEXTCLOUD_APP_SECRET=fizzbang
|
||||||
NEXTCLOUD_USER=decentral1se
|
NEXTCLOUD_USER=decentral1se
|
||||||
REDIS_DB=0
|
REDIS_DB=0
|
||||||
REDIS_HOST=localhost
|
REDIS_HOST=localhost
|
||||||
|
@ -13,7 +13,9 @@ services:
|
|||||||
- KEYCLOAK_CLIENT_SECRET_FILE=/run/secrets/keycloak_client_secret
|
- KEYCLOAK_CLIENT_SECRET_FILE=/run/secrets/keycloak_client_secret
|
||||||
- KEYCLOAK_DOMAIN
|
- KEYCLOAK_DOMAIN
|
||||||
- KEYCLOAK_REALM
|
- KEYCLOAK_REALM
|
||||||
|
- NEXTCLOUD_API_BASE_URL
|
||||||
- NEXTCLOUD_APP_SECRET_FILE=/run/secrets/nextcloud_app_secret
|
- NEXTCLOUD_APP_SECRET_FILE=/run/secrets/nextcloud_app_secret
|
||||||
|
- NEXTCLOUD_USER
|
||||||
- REDIS_DB=0
|
- REDIS_DB=0
|
||||||
- REDIS_HOST=cache
|
- REDIS_HOST=cache
|
||||||
- REDIS_PORT=6379
|
- REDIS_PORT=6379
|
||||||
|
@ -18,13 +18,16 @@ async def register_invite(
|
|||||||
):
|
):
|
||||||
from members_lumbung_space.config import INVITE_TIME_LIMIT
|
from members_lumbung_space.config import INVITE_TIME_LIMIT
|
||||||
|
|
||||||
matching, username, matching_invite = False, None, None
|
matching, invited_by, matching_invite = False, None, None
|
||||||
for username in invites:
|
for username in invites:
|
||||||
for _invite in invites[username]:
|
for _invite in invites[username]:
|
||||||
if invite == _invite["link"]:
|
if invite == _invite["link"]:
|
||||||
matching = True
|
matching = True
|
||||||
username = username
|
invited_by = username
|
||||||
matching_invite = _invite
|
matching_invite = _invite
|
||||||
|
break
|
||||||
|
if matching:
|
||||||
|
break
|
||||||
|
|
||||||
if not matching:
|
if not matching:
|
||||||
message = "This invite does not exist, sorry."
|
message = "This invite does not exist, sorry."
|
||||||
@ -45,7 +48,7 @@ async def register_invite(
|
|||||||
"invalid.html", context=context
|
"invalid.html", context=context
|
||||||
)
|
)
|
||||||
|
|
||||||
context = {"request": request, "invited_by": username}
|
context = {"request": request, "invited_by": invited_by}
|
||||||
return request.app.state.templates.TemplateResponse(
|
return request.app.state.templates.TemplateResponse(
|
||||||
"register.html", context=context
|
"register.html", context=context
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user