This is an automated email from the ASF dual-hosted git repository. johnbodley pushed a commit to branch john-bodley--fix-get-feature-flags-func-example in repository https://gitbox.apache.org/repos/asf/incubator-superset.git
commit 05480ed0d3ea4b75e7034093b2a18283707a1d53 Author: John Bodley <[email protected]> AuthorDate: Fri Mar 20 19:26:46 2020 -0700 [config] Fixing GET_FEATURE_FLAGS_FUNC example --- superset/config.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/superset/config.py b/superset/config.py index 8a85d14..b547355 100644 --- a/superset/config.py +++ b/superset/config.py @@ -302,7 +302,8 @@ FEATURE_FLAGS: Dict[str, bool] = {} # # from flask import g, request # def GET_FEATURE_FLAGS_FUNC(feature_flags_dict): -# feature_flags_dict['some_feature'] = g.user and g.user.id == 5 +# if hasattr(g, "user") and g.user.is_active: +# feature_flags_dict['some_feature'] = g.user and g.user.id == 5 # return feature_flags_dict GET_FEATURE_FLAGS_FUNC = None
