mirror of
https://github.com/ha7ilm/openwebrx.git
synced 2026-04-21 06:13:45 +00:00
refactor authentication / authorization into a mixin
This commit is contained in:
parent
8422a33081
commit
17c20d12e0
3 changed files with 9 additions and 8 deletions
|
|
@ -1,9 +1,10 @@
|
|||
from owrx.controllers.admin import AdminController
|
||||
from owrx.controllers.template import WebpageController
|
||||
from owrx.controllers.admin import AuthorizationMixin
|
||||
from owrx.users import UserList, DefaultPasswordClass
|
||||
from urllib.parse import parse_qs
|
||||
|
||||
|
||||
class ProfileController(AdminController):
|
||||
class ProfileController(AuthorizationMixin, WebpageController):
|
||||
def isAuthorized(self):
|
||||
return self.user is not None and self.user.is_enabled() and self.user.must_change_password
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue