diff --git a/advlabdb/customClasses.py b/advlabdb/customClasses.py index f2fc335..af10a17 100644 --- a/advlabdb/customClasses.py +++ b/advlabdb/customClasses.py @@ -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()