From 8014820f057d4ae80395053f758ac9dd7b56a6f7 Mon Sep 17 00:00:00 2001 From: Brian Peterson Date: Thu, 29 Aug 2019 10:14:34 -0600 Subject: [PATCH] RedirectIndex should be invisible --- flask_secure_admin/security/indexes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flask_secure_admin/security/indexes.py b/flask_secure_admin/security/indexes.py index 978c519..0f59414 100644 --- a/flask_secure_admin/security/indexes.py +++ b/flask_secure_admin/security/indexes.py @@ -17,6 +17,7 @@ class SecureRedirectIndex(AdminIndexView): def __init__(self, index_endpoint, *args, **kwargs): self.index_endpoint = index_endpoint + self.is_visible = lambda: False super(SecureRedirectIndex, self).__init__(*args, **kwargs) @expose('/') @@ -27,7 +28,6 @@ def index(self): is not the default value. """ if self.index_endpoint and \ self.index_endpoint != DEFAULT_INDEX_ENDPOINT: - self.is_visible = lambda: False return redirect(url_for(self.index_endpoint, _external=True)) else: return self.render(DEFAULT_INDEX_TEMPLATE)