refactor authentication / authorization into a mixin

This commit is contained in:
Jakob Ketterl
2021-02-10 20:21:45 +01:00
parent 8422a33081
commit 17c20d12e0
3 changed files with 9 additions and 8 deletions

View File

@@ -1,4 +1,3 @@
from .template import WebpageController
from .session import SessionStorage
from owrx.config import Config
from owrx.users import UserList
@@ -25,7 +24,7 @@ class Authentication(object):
return None
class AdminController(WebpageController):
class AuthorizationMixin(object):
def __init__(self, handler, request, options):
self.authentication = Authentication()
self.user = self.authentication.getUser(request)