You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@superset.apache.org by GitBox <gi...@apache.org> on 2018/02/23 18:51:41 UTC

[GitHub] hughhhh commented on a change in pull request #4463: New Landing Page v1.0

hughhhh commented on a change in pull request #4463: New Landing Page v1.0
URL: https://github.com/apache/incubator-superset/pull/4463#discussion_r170334668
 
 

 ##########
 File path: superset/views/utils.py
 ##########
 @@ -0,0 +1,53 @@
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import print_function
+from __future__ import unicode_literals
+
+from collections import defaultdict
+
+from flask import g
+from flask_appbuilder.security.sqla import models as ab_models
+
+from superset import db
+
+
+def bootstrap_user_data(given_username=None):
+    if given_username:
+        username = given_username
+    else:
+        username = g.user.username
+
+    user = (
+        db.session.query(ab_models.User)
+        .filter_by(username=username)
+        .one()
+    )
+    roles = {}
+    permissions = defaultdict(set)
+    for role in user.roles:
 
 Review comment:
   ? on the graphQL

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services