Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Merge pull request #2359 from wger-project/feature/version-2.6

Roland Geiderdf894f616193
diff --cc settings/main.py
index 82b5c72c7,88889e27a..e16b51799
--- a/settings/main.py
+++ b/settings/main.py
@@@ -201,6 -239,20 +239,17 @@@ if os.environ.get('DJANGO_CACHE_BACKEND
CACHES['default']['OPTIONS']['CONNECTION_POOL_KWARGS'] = CONNECTION_POOL_KWARGS
-# The site's domain as used by the email verification workflow
-EMAIL_PAGE_DOMAIN = SITE_URL
-
+ #
+ # Two-factor authentication (allauth.mfa)
+ #
+ # Lets self-hosted instances drop a factor, most notably 'webauthn', which
+ # needs a secure context (HTTPS or localhost) and therefore does not work on
+ # plain-HTTP deployments.
+ MFA_SUPPORTED_TYPES = env.list(
+ 'MFA_SUPPORTED_TYPES',
+ default=['totp', 'recovery_codes', 'webauthn'],
+ )
+
#
# Django Axes
#
diff --cc settings/settings_global.py
index 875174d8c,acb1fce61..44929425d
--- a/settings/settings_global.py
+++ b/settings/settings_global.py
@@@ -403,9 -480,8 +479,8 @@@ REST_FRAMEWORK =
'DEFAULT_THROTTLE_CLASSES': ['rest_framework.throttling.ScopedRateThrottle'],
'DEFAULT_THROTTLE_RATES': {
'login': '10/min',
- 'registration': '5/min',
- # Ingredient endpoints — protect the multi-million-row table from
+ # Ingredient endpoints: protect the multi-million-row table from
# crawlers and older sync clients. Throttling is per-IP for anonymous
# callers and per-user for authenticated ones.
'ingredient_list': '120/min',
diff --cc wger/manager/api/views.py
index fec2cb108,a8f151f24..6513e6fcf
--- a/wger/manager/api/views.py
+++ b/wger/manager/api/views.py
@@@ -427,9 -439,10 +436,10 @@@ class AbstractConfigViewSet(WgerOwnerOb
is_private = True
ordering_fields = '__all__'
- filterset_fields = BASE_CONFIG_FIELDS
+ filterset_fields = BASE_CONFIG_FILTER_FIELDS
- def get_owner_objects(self):
+ @staticmethod
+ def get_owner_objects():
"""
Return objects to check for ownership permission
"""