haldis/app/add_admins.py
2022-05-20 21:02:24 +02:00

14 lines
367 B
Python

"""Script for adding users as admin to Haldis."""
from models import User
from app import db
from models import User
from config import Configuration
def add() -> None:
"""Add users as admin."""
for username in Configuration.HALDIS_ADMINS:
user = User()
user.configure(username, True, 0, associations=["zeus"])
db.session.add(user)