Admin view class factory for creating protected admin views on-the-fly.
Function used to check if a user has any admin access.
Initialize menu before first request.
Factory for creating protected admin view classes.
The factory will ensure that the admin view will check if a user is authenticated and has the necessary permissions (as defined by the permission factory).
The factory creates a new class using the provided class as base class and overwrites
inaccessible_callback()methods. Super is called for both methods, so the base class can implement furhter restrictions if needed.
Parameters: base_class (
flask_admin.base.BaseView) – Class to use as base class.
Returns: Admin view class which provides authentication and authorization.