update version to 2.0.0

This commit is contained in:
Tim Gröger 2024-01-16 19:49:56 +01:00
parent cab172dc65
commit bddb11d1b4
5 changed files with 21 additions and 5 deletions

View File

@ -0,0 +1 @@
/home/crimsen/git/flaschengeist/flaschengeist/flaschengeist/plugins/balance/migrations/98f2733bbe45_balance_initial.py

View File

@ -0,0 +1 @@
/home/crimsen/git/flaschengeist/flaschengeist-pricelist-old/backend/flaschengeist_pricelist_old/migrations/9d5bf89eb130_init_old_pricelist.py

View File

@ -0,0 +1 @@
/home/crimsen/git/flaschengeist/flaschengeist-schedule/backend/flaschengeist_events/migrations/e70508bd8cb4_init_events.py

View File

@ -6,13 +6,15 @@ from werkzeug.exceptions import NotFound
@click.command(no_args_is_help=True)
@click.option("--sync", is_flag=True, default=False, help="Synchronize users from LDAP -> database")
@click.option("--sync-ldap", is_flag=True, default=False, help="Synchronize users from database -> LDAP")
@with_appcontext
@click.pass_context
def ldap(ctx, sync):
def ldap(ctx, sync, sync_ldap):
"""Tools for the LDAP authentification"""
from flaschengeist.controller import userController
from flaschengeist.plugins.auth_ldap import AuthLDAP
if sync:
from flaschengeist.controller import userController
from flaschengeist.plugins.auth_ldap import AuthLDAP
click.echo("Synchronizing users from LDAP -> database")
from ldap3 import SUBTREE
from flaschengeist.models import User
from flaschengeist.database import db
@ -33,3 +35,13 @@ def ldap(ctx, sync):
user = User(userid=uid)
db.session.add(user)
userController.update_user(user, auth_ldap)
if sync_ldap:
click.echo("Synchronizing users from database -> LDAP")
auth_ldap: AuthLDAP = current_app.config.get("FG_PLUGINS").get("auth_ldap")
if auth_ldap is None or not isinstance(auth_ldap, AuthLDAP):
ctx.fail("auth_ldap plugin not found or not enabled!")
users = userController.get_users()
for user in users:
userController.update_user(user, auth_ldap)

View File

@ -1,6 +1,6 @@
[metadata]
license = MIT
version = 2.0.0.dev1
version = 2.0.0
name = flaschengeist
author = Tim Gröger
author_email = flaschengeist@wu5.de
@ -22,7 +22,8 @@ include_package_data = True
python_requires = >=3.10
packages = find:
install_requires =
Flask>=2.2.2, <2.3
#Flask>=2.2.2, <2.3
Flask>=2.2.2
Pillow>=9.2
flask_cors
flask_migrate>=3.1.0