DalgoT4D / docker-superset

Superset for DDP: docker image build and container startup
0 stars 1 forks source link

Provide option to specify alternate homepage #60

Open fatchat opened 2 months ago

fatchat commented 2 months ago

Allow Superset installations to

  1. Define a new homepage via (https://gist.github.com/d9k/a638071ce7146ef01c27779a51d96f2b)
class SupersetDashboardIndexView(IndexView):
    @expose("/")
    def index(self) -> FlaskResponse:
      return NEW_HOMEPAGE_URL
  1. Specify homepage based on role of logged-in user (security_manager.get_user_roles())

  2. Or stick with the default behavior

The superset_config.py will check a variable in superset.env based on which it might import one of the new views and set FAB_INDEX_VIEW accordingly.

The superset_config.py should import (from the top of the file) a new role2indexurl.py which contains this mapping for the Superset installation. By default this mapping is empty