Search code examples
viewapache-superset

'Access is denied' error when creating a new view in Superset


I've been trying to add an additional view extending SimpleFormView (in a similar way to how CsvToDatabaseView works).

I first started off by searched for all related CsvToDatabaseView code occurrences and created an equivalent of each for my new view. I am constantly getting an 'Access is denied' message (with a 302 redirect) whenever I try to open the this new url. (equivalent to /csvtodatabaseview/form).

Setting the new template path in CsvToDatabaseView does work however so problem seems to be with the form and it's url. Changing all occurrences of CsvToDatabaseView to CvToDatabaseView for testing purposes does not work either. Am I missing something?


Solution

  • Apparently after making the necessary code changes, one needs to run superset init in order for this new connection to be persisted to the database.

    Each exposed endpoint will get a permission entry added to the ab_view_menu table.