1
0
Fork 0
mirror of https://codeberg.org/Mo8it/AdvLabDB.git synced 2024-12-20 23:41:20 +00:00

Added SecureAdminBaseView

This commit is contained in:
Mo 2021-09-11 20:48:14 +02:00
parent 071a5e94b5
commit 40ab16f632

View file

@ -1,5 +1,5 @@
from flask import flash, redirect, request, url_for
from flask_admin import AdminIndexView
from flask_admin import AdminIndexView, BaseView
from flask_admin.contrib.sqla import ModelView
from flask_security import current_user
@ -102,3 +102,8 @@ class SecureAssistantModelView(CustomModelView):
def is_accessible(self):
return assistantViewIsAccessible()
class SecureAdminBaseView(BaseView):
def is_accessible(self):
return adminViewIsAccessible()