Missing group message

* adds group checker decorator for adding a message informing about missing group privileges
This commit is contained in:
mipel
2021-08-03 09:45:41 +02:00
parent 715cf65538
commit 19f50baae4
7 changed files with 134 additions and 89 deletions

View File

@@ -6,11 +6,13 @@ from django.shortcuts import render, redirect, get_object_or_404
from django.utils.translation import gettext_lazy as _
from konova.contexts import BaseContext
from konova.decorators import any_group_check
from user.forms import UserNotificationForm, UserContactForm
from user.models import KonovaUserExtension
@login_required
@any_group_check
def index_view(request: HttpRequest):
""" Renders the user's data index view
@@ -29,6 +31,7 @@ def index_view(request: HttpRequest):
@login_required
@any_group_check
def notifications_view(request: HttpRequest):
""" Renders the notifications settings view