haldis/app/add_admins.py

15 lines
367 B
Python
Raw Normal View History

2022-04-19 21:31:40 +02:00
"""Script for adding users as admin to Haldis."""
2022-04-19 22:03:00 +02:00
from models import User
2022-04-19 21:31:40 +02:00
from app import db
from models import User
from config import Configuration
2019-09-07 15:05:24 +02:00
def add() -> None:
2022-04-19 21:31:40 +02:00
"""Add users as admin."""
for username in Configuration.HALDIS_ADMINS:
user = User()
user.configure(username, True, 0, associations=["zeus"])
db.session.add(user)