Spaces:
Sleeping
Sleeping
ArthurCFR Claude commited on
Commit ·
85c093e
1
Parent(s): c7206fa
Remove password page access control
Browse filesRemoved the access code verification system that required users to enter "SUPPORT" to access the application. This includes:
- Access control session state initialization
- Password input form with CSS styling
- Access validation logic and error handling
- st.stop() call that blocked unauthorized access
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
app.py
CHANGED
|
@@ -519,72 +519,6 @@ def load_editable_prompts_from_local_or_hf():
|
|
| 519 |
st.error(f"Erreur sauvegarde initiale: {e}")
|
| 520 |
return initial_data
|
| 521 |
|
| 522 |
-
# --- ACCESS CODE VERIFICATION ---
|
| 523 |
-
# Initialize access control session state
|
| 524 |
-
if 'access_granted' not in st.session_state:
|
| 525 |
-
st.session_state.access_granted = False
|
| 526 |
-
if 'access_code_input' not in st.session_state:
|
| 527 |
-
st.session_state.access_code_input = ""
|
| 528 |
-
|
| 529 |
-
# Access code popup
|
| 530 |
-
if not st.session_state.access_granted:
|
| 531 |
-
# Simple CSS for background styling
|
| 532 |
-
st.markdown("""
|
| 533 |
-
<style>
|
| 534 |
-
.stApp {
|
| 535 |
-
background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
|
| 536 |
-
backdrop-filter: blur(10px);
|
| 537 |
-
}
|
| 538 |
-
.access-container {
|
| 539 |
-
background: white;
|
| 540 |
-
padding: 0.6rem;
|
| 541 |
-
border-radius: 20px;
|
| 542 |
-
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
|
| 543 |
-
margin: 0.5rem auto;
|
| 544 |
-
max-width: 500px;
|
| 545 |
-
text-align: center;
|
| 546 |
-
}
|
| 547 |
-
</style>
|
| 548 |
-
""", unsafe_allow_html=True)
|
| 549 |
-
|
| 550 |
-
# No vertical spacing to align at top
|
| 551 |
-
|
| 552 |
-
# Create the access form
|
| 553 |
-
with st.container():
|
| 554 |
-
st.markdown("""
|
| 555 |
-
<div class="access-container">
|
| 556 |
-
<h1 style="color: #333; margin-bottom: 1rem;">🔐 Accès Sécurisé</h1>
|
| 557 |
-
<p style="color: #666; font-size: 1.1rem; margin-bottom: 2rem;">
|
| 558 |
-
Veuillez entrer le code d'accès pour utiliser l'application
|
| 559 |
-
</p>
|
| 560 |
-
</div>
|
| 561 |
-
""", unsafe_allow_html=True)
|
| 562 |
-
|
| 563 |
-
# Center the form elements
|
| 564 |
-
col1, col2, col3 = st.columns([1, 2, 1])
|
| 565 |
-
with col2:
|
| 566 |
-
access_code = st.text_input(
|
| 567 |
-
"Code d'accès",
|
| 568 |
-
placeholder="Entrez le code d'accès...",
|
| 569 |
-
key="access_code_input_field"
|
| 570 |
-
)
|
| 571 |
-
|
| 572 |
-
if st.button("✅ Valider", use_container_width=True, type="primary"):
|
| 573 |
-
if access_code == "SUPPORT":
|
| 574 |
-
st.session_state.access_granted = True
|
| 575 |
-
st.rerun()
|
| 576 |
-
else:
|
| 577 |
-
st.error("❌ Code d'accès incorrect")
|
| 578 |
-
|
| 579 |
-
st.markdown("""
|
| 580 |
-
<p style="font-style: italic; color: #666; font-size: 0.9rem; margin-top: 1.5rem; text-align: center;">
|
| 581 |
-
Pour demander un accès, contactez votre référent métier ou l'administrateur de l'application :
|
| 582 |
-
<a href="mailto:arthur.causse@aibuilders.ai" style="color: #0066cc;">arthur.causse@aibuilders.ai</a>
|
| 583 |
-
</p>
|
| 584 |
-
""", unsafe_allow_html=True)
|
| 585 |
-
|
| 586 |
-
# Stop execution here if access not granted
|
| 587 |
-
st.stop()
|
| 588 |
|
| 589 |
# --- Session State Initialization ---
|
| 590 |
if 'editable_prompts' not in st.session_state:
|
|
|
|
| 519 |
st.error(f"Erreur sauvegarde initiale: {e}")
|
| 520 |
return initial_data
|
| 521 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 522 |
|
| 523 |
# --- Session State Initialization ---
|
| 524 |
if 'editable_prompts' not in st.session_state:
|