mirror of
https://codeberg.org/Mo8it/AdvLabDB.git
synced 2024-12-20 23:41:20 +00:00
Added SecureAdminBaseView
This commit is contained in:
parent
071a5e94b5
commit
40ab16f632
1 changed files with 6 additions and 1 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue