diff --git a/src/pretix/control/context.py b/src/pretix/control/context.py index 8ea5bb0d6..0c9fb3dfa 100644 --- a/src/pretix/control/context.py +++ b/src/pretix/control/context.py @@ -69,7 +69,7 @@ def contextprocessor(request): ctx['selected_subevents'] = request.event.subevents.filter(pk=request.GET.get('subevent')) elif getattr(request, 'organizer', None) and request.user.is_authenticated: ctx['nav_items'] = get_organizer_navigation(request) - else: + elif request.user.is_authenticated: ctx['nav_items'] = get_global_navigation(request) ctx['js_payment_weekdays_disabled'] = _js_payment_weekdays_disabled diff --git a/src/pretix/control/navigation.py b/src/pretix/control/navigation.py index 411ccf771..95ae7407c 100644 --- a/src/pretix/control/navigation.py +++ b/src/pretix/control/navigation.py @@ -288,7 +288,7 @@ def get_global_navigation(request): { 'label': _('Organizers'), 'url': reverse('control:organizers'), - 'active': 'events' in url.url_name, + 'active': 'organizers' in url.url_name, 'icon': 'group', }, { @@ -297,6 +297,39 @@ def get_global_navigation(request): 'active': 'search.orders' in url.url_name, 'icon': 'search', }, + { + 'label': _('User settings'), + 'url': reverse('control:user.settings'), + 'active': False, + 'icon': 'user', + 'children': [ + { + 'label': _('General'), + 'url': reverse('control:user.settings'), + 'active': 'user.settings' == url.url_name, + }, + { + 'label': _('Notifications'), + 'url': reverse('control:user.settings.notifications'), + 'active': 'user.settings.notifications' == url.url_name, + }, + { + 'label': _('2FA'), + 'url': reverse('control:user.settings.2fa'), + 'active': 'user.settings.2fa' in url.url_name, + }, + { + 'label': _('Authorized apps'), + 'url': reverse('control:user.settings.oauth.list'), + 'active': 'user.settings.oauth' in url.url_name, + }, + { + 'label': _('Account history'), + 'url': reverse('control:user.settings.history'), + 'active': 'user.settings.history' in url.url_name, + }, + ] + }, ] if has_staff_session: nav.append({ diff --git a/src/pretix/control/templates/pretixcontrol/base.html b/src/pretix/control/templates/pretixcontrol/base.html index 373733938..73e8cc257 100644 --- a/src/pretix/control/templates/pretixcontrol/base.html +++ b/src/pretix/control/templates/pretixcontrol/base.html @@ -95,21 +95,6 @@ -
- -
- - - {% trans "Show applications" %} - -
-
-
- -
- - - {% trans "Show account history" %} - -
-