Fix anonymous access 500 error and add environment variable control
- Fixed dashboard.html template error accessing current_user.username for anonymous users - Added ALLOW_ANONYMOUS_ACCESS environment variable with default true - Enhanced index route logic to properly check config before allowing anonymous access - Added proper environment variable to docker-compose.yml - Anonymous access now works without 500 server errors Fixes issue #2 completely - anonymous access is now functional 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -30,13 +30,21 @@
|
||||
<div class="user-menu">
|
||||
<div class="user-info">
|
||||
<div class="user-avatar">
|
||||
{% if current_user.profile_picture_url %}
|
||||
<img src="{{ current_user.profile_picture_url }}" alt="Avatar">
|
||||
{% if current_user.is_authenticated %}
|
||||
{% if current_user.profile_picture_url %}
|
||||
<img src="{{ current_user.profile_picture_url }}" alt="Avatar">
|
||||
{% else %}
|
||||
<div class="avatar-placeholder">{{ current_user.username[:2].upper() }}</div>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<div class="avatar-placeholder">{{ current_user.username[:2].upper() }}</div>
|
||||
<div class="avatar-placeholder">?</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<span class="username">{{ current_user.username }}</span>
|
||||
{% if current_user.is_authenticated %}
|
||||
<span class="username">{{ current_user.username }}</span>
|
||||
{% else %}
|
||||
<span class="username">Anonymous User</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="user-dropdown">
|
||||
<a href="{{ url_for('settings') }}" class="dropdown-item">⚙️ Settings</a>
|
||||
|
||||
Reference in New Issue
Block a user