• Stefy Lanza (nextime / spora )'s avatar
    Implement comprehensive admin settings and token management system · 26bf985b
    Stefy Lanza (nextime / spora ) authored
    - Restrict settings page to admin users only with @admin_required decorator
    - Add database configuration section to admin settings (SQLite/MySQL settings)
    - Create admin-only worker token generation for --client authentication
    - Create user-accessible API token generation for programmatic access
    - Implement user API token validation that consumes user tokens for analysis
    - Add database tables for worker_tokens and user_api_tokens
    - Add API endpoint /api/analyze that validates user tokens and deducts tokens
    - Admin users are exempt from token consumption for all operations
    - Enhanced settings page with database management and token generation options
    26bf985b
auth.py 4.7 KB