Missing group message
* adds group checker decorator for adding a message informing about missing group privileges
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user