Initial commit

This commit is contained in:
Blake Ridgway 2025-07-05 15:29:33 -05:00
commit 315e731234
27 changed files with 3403 additions and 0 deletions

24
user.py Normal file
View file

@ -0,0 +1,24 @@
import os
from flask_login import UserMixin
class User(UserMixin):
def __init__(self, username):
self.id = username
self.username = username
@staticmethod
def get(username):
admin_username = os.getenv('ADMIN_USERNAME', 'admin')
if username == admin_username:
return User(username)
return None
@staticmethod
def authenticate(username, password):
admin_username = os.getenv('ADMIN_USERNAME', 'admin')
admin_password = os.getenv('ADMIN_PASSWORD', 'password')
if username == admin_username and password == admin_password:
return User(username)
return None