- Move `import os` to top-level in app/views/backup.py
- Fix docstring in BackupRecord model to remove non-existent 'location' field
- Replace browser confirm() dialogs with accessible modal dialog (role=dialog, aria-modal, aria-labelledby)
- Add csrfToken() helper that validates token presence instead of silently falling back to empty string
- Fix aria-live region to remain in DOM (screen-reader friendly) rather than using x-show
- Add Backup & Restore section to docs/ConfigurationGuide.md with retention table
- Add backup env vars to .env.demo with comments
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
When ADMIN_USERNAME/ADMIN_PASSWORD env vars are not configured, settings
values are None. Python's `None == None` evaluates to True, so any login
request omitting those form fields was authenticated as admin — creating a
phantom 'None@local.docuelevate' profile with admin rights and business plan.
Guard the admin credential check to require both values to be truthy
(non-None, non-empty) before attempting the comparison.
Adds three regression tests covering: both None, both empty-string, and
only password None scenarios.
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
The "Block this user" and "Complimentary plan" toggle switches were always
greyed out because the app loads Tailwind CSS v2.2.19 from CDN, but the
toggles used Tailwind v3-only features (peer, peer-checked:*, after:content-[''],
arbitrary value syntax like after:top-[2px], etc.).
Replaced both toggles with button[role=switch] elements driven by Alpine.js
@click handlers and :class bindings — fully compatible with Tailwind v2.
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
All four CTA anchor elements on pricing.html were hardcoded to /login.
They now use /signup when allow_signup is True (MULTI_USER_ENABLED and
ALLOW_LOCAL_SIGNUP both true), falling back to /login when signup is
disabled. Bottom CTA button text also updates accordingly.
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
Both sets of UserProfile columns are retained:
- is_complimentary (from main, migration 019_add_is_complimentary)
- subscription_change_pending_tier / subscription_change_pending_date
(our branch, renamed to migration 020_add_subscription_change_pending
with down_revision updated to chain after 019_add_is_complimentary)
Resolve conflicts in app/auth.py and app/api/admin_users.py:
- auth.py: combine admin-aware profile creation (from main, adding
is_complimentary/highest-tier defaults for admins) with signup
notification/webhook (from our branch). Admin users skip the
signup notification since they are the ones being notified.
- admin_users.py: combine is_complimentary assignment (from main)
with tier_changed/new_tier tracking variables (from our branch)
to fire plan-change notifications when an admin updates a user.
Previously, duplicate Help links existed inside both branches of the
{% if multi_user_enabled and not is_logged_in %}...{% else %}...{% endif %}
conditional. This refactoring places a single Help link AFTER {% endif %}
in both the desktop and mobile menus, guaranteeing it renders for:
- Unauthenticated visitors (multi-user mode)
- Logged-in users (multi-user mode)
- All users in single-user / auth-disabled mode
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>