You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ma...@apache.org on 2020/11/01 17:22:47 UTC

[incubator-superset] branch master updated: feat: make logo link point to welcome page (#11519)

This is an automated email from the ASF dual-hosted git repository.

maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 854a461  feat: make logo link point to welcome page (#11519)
854a461 is described below

commit 854a4614a82c489422e1cc588cb85955802bd0a2
Author: Maxime Beauchemin <ma...@gmail.com>
AuthorDate: Sun Nov 1 09:22:09 2020 -0800

    feat: make logo link point to welcome page (#11519)
---
 superset/views/base.py | 18 +-----------------
 1 file changed, 1 insertion(+), 17 deletions(-)

diff --git a/superset/views/base.py b/superset/views/base.py
index 3eb330c..a5ead2c 100644
--- a/superset/views/base.py
+++ b/superset/views/base.py
@@ -257,22 +257,6 @@ class BaseSupersetView(BaseView):
 
 def menu_data() -> Dict[str, Any]:
     menu = appbuilder.menu.get_data()
-    root_path = "#"
-    logo_target_path = ""
-    if not g.user.is_anonymous:
-        try:
-            logo_target_path = (
-                appbuilder.app.config["LOGO_TARGET_PATH"]
-                or f"/profile/{g.user.username}/"
-            )
-        # when user object has no username
-        except NameError as ex:
-            logger.exception(ex)
-
-        if logo_target_path.startswith("/"):
-            root_path = f"/superset{logo_target_path}"
-        else:
-            root_path = logo_target_path
 
     languages = {}
     for lang in appbuilder.languages:
@@ -283,7 +267,7 @@ def menu_data() -> Dict[str, Any]:
     return {
         "menu": menu,
         "brand": {
-            "path": root_path,
+            "path": appbuilder.app.config["LOGO_TARGET_PATH"] or "/",
             "icon": appbuilder.app_icon,
             "alt": appbuilder.app_name,
             "width": appbuilder.app.config["APP_ICON_WIDTH"],