Hi everyone, just starting developing with streamlit.
I was wondering if there is a built solution or a workaround for managing based on the user’s roles.
Example: A variety of users are going to use the application and I would like to redirect them to a specific page and parameters depending on which user or role they belong to.
Any idea?
Hi @rmendoza,
I’m developing similar functionality for a team app I’m working on. I’d recommend looking into the new components feature for implementing it. I’m happy to share any work as it comes to fruition.
Docs for components: https://docs.streamlit.io/en/stable/streamlit_components.html. Repo (with template code and demo to start): https://github.com/streamlit/component-template. Note, If you don’t know React, it might be helpful to spend a few minutes reviewing a quick tutorial on React and JSX: https://reactjs.org/docs/introducing-jsx.html. Historical context and reasoning behind React and JSX: https://www.youtube.com/watch?v=x7cQ3mrcKaY
Also, as an additional avenue for developing user role management in Streamlit, check out the discussions on session / state (e.g. Idea: Streamlit Sessions)
3 Likes