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
|
|
|
|
2015-04-04 14:11:55 +02:00
|
|
|
from app import db
|
2022-04-19 20:08:29 +02:00
|
|
|
from models import User
|
|
|
|
from config import Configuration
|
2015-04-04 14:11:55 +02:00
|
|
|
|
|
|
|
|
2019-09-07 15:05:24 +02:00
|
|
|
def add() -> None:
|
2022-04-19 21:31:40 +02:00
|
|
|
"""Add users as admin."""
|
2022-04-19 20:08:29 +02:00
|
|
|
for username in Configuration.HALDIS_ADMINS:
|
|
|
|
user = User()
|
2022-05-20 19:04:32 +02:00
|
|
|
user.configure(username, True, 0, associations=["zeus"])
|
2022-04-19 20:08:29 +02:00
|
|
|
db.session.add(user)
|