Permission rethinking
* No detailed permissions due to django constraints on model-based permissions * instead: logic controlled permission by group membership * adds translations
This commit is contained in:
parent
92701eda40
commit
ed35aea034
@ -26,7 +26,6 @@ class BaseContext:
|
||||
def __init__(self, request: HttpRequest, additional_context: dict = {}):
|
||||
self.context["language"] = request.LANGUAGE_CODE
|
||||
self.context["user"] = request.user
|
||||
self.__handle_current_role(request)
|
||||
|
||||
# Add additional context, derived from given parameters
|
||||
self.context.update(additional_context)
|
||||
|
@ -6,6 +6,7 @@ Created on: 16.11.20
|
||||
|
||||
"""
|
||||
from django.contrib.auth import logout
|
||||
from django.contrib.auth.decorators import login_required
|
||||
from django.http import HttpRequest
|
||||
from django.shortcuts import redirect, render
|
||||
|
||||
@ -27,6 +28,7 @@ def logout_view(request: HttpRequest):
|
||||
return redirect(SSO_SERVER_BASE)
|
||||
|
||||
|
||||
@login_required
|
||||
def home_view(request: HttpRequest):
|
||||
"""
|
||||
Renders the landing page
|
||||
|
Loading…
Reference in New Issue
Block a user