Custom visibility of pages and callbacks based on logged in user

Hi everyone,

I’m looking to incorporate some custom access controls on a dash application - namely, restricting particular pages and callbacks to logged in users with particular access levels. For the pages, at a high-level I am aiming to build the following:

  • by default, pages are visible to anyone (a future feature would be to create default access control for all pages)
  • for particular pages, evaluate a function based on the logged in user info to determine if this page is valid for that user
  • if the page is not valid, this should function as if the page does not exist (i.e. return a 404)

I think I have a way forward using some custom multi-page code that I wrote prior to pages becoming a feature, but I would like to incorporate it into the current pages functionality, and was wondering if there was any broader appetite for this kind of functionality? Briefly looking at the pages code functionality, I think I can fork and implement something that works for me, but want to make it more useful if possible (and ideally done in such a way that I don’t have to maintain a fork).

Hello @benn0,

You should check out here:

1 Like