gravity / pages /admin.py
ayushnoori's picture
Add user authentication
f128fe5
raw
history blame
413 Bytes
import streamlit as st
from menu import menu_with_redirect
# Redirect to app.py if not logged in, otherwise show the navigation menu
menu_with_redirect()
# Verify the user's role
if st.session_state.role not in ["admin"]:
st.warning("You do not have permission to view this page.")
st.stop()
st.title("User Management")
st.markdown(f"You are currently logged with the role of {st.session_state.role}.")