dpgaspar commented on a change in pull request #10401:
URL: 
https://github.com/apache/incubator-superset/pull/10401#discussion_r462143849



##########
File path: superset/views/base.py
##########
@@ -256,10 +256,13 @@ def json_response(
 
 
 def menu_data() -> Dict[str, Any]:
-    menu = appbuilder.menu.get_data()
+    menu = []
     root_path = "#"
     logo_target_path = ""
-    if not g.user.is_anonymous:
+    user_is_anonymous = True
+    if hasattr(g, "user") and not g.user.is_anonymous:

Review comment:
       Isn't that a flaky test? would risk to say it was a coincidence. 
   Re checked and it works with anonymous and the public role, 
https://github.com/dpgaspar/Flask-AppBuilder/blob/master/flask_appbuilder/tests/test_menu.py#L101
 but we need to add the endpoint to the public role. Yet `menu.get_data` shoud 
work




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to