Example #1
0
def check_accessible(panel_name):
    if not AuthManager.is_accessible():
        return redirect(url_for('admin.login_view', next=request.url))
    else:
        if not current_user.can_access_panel(
                panel_name) and not current_user.is_staff:
            abort(403)
def check_accessible():
    if not AuthManager.is_accessible():
        return redirect(url_for('admin.login_view', next=request.url))
Example #3
0
def check_accessible():
    if not AuthManager.is_accessible():
        return redirect(url_for('admin.login_view', next=request.url))
def check_accessible(panel_name):
    if not AuthManager.is_accessible():
        return redirect(url_for('admin.login_view', next=request.url))
    else:
        if not current_user.can_access_panel(panel_name) and not current_user.is_staff:
            abort(403)