diff --git a/server/requirements/requirements-dev.txt b/server/requirements/requirements-dev.txt index 2e726be0..ccbef00d 100644 --- a/server/requirements/requirements-dev.txt +++ b/server/requirements/requirements-dev.txt @@ -353,17 +353,9 @@ packaging==24.1 # msal-extensions # pytest # pytest-sugar -<<<<<<< HEAD -paramiko==3.3.1 - # via - # -r requirements.in - # sftpserver -parso==0.8.3 -======= paramiko==3.4.0 # via -r requirements.in parso==0.8.4 ->>>>>>> 9e6b9a1e (wip: Add KC-client and basic methods, signal handler) # via jedi pathspec==0.12.1 # via @@ -416,15 +408,10 @@ pyflakes==3.2.0 pygments==2.18.0 # via ipython pyjwt[crypto]==2.8.0 -<<<<<<< HEAD - # via msal -pylint==2.17.5 -======= # via # msal # pyjwt pylint==3.2.3 ->>>>>>> 9e6b9a1e (wip: Add KC-client and basic methods, signal handler) # via # pylint-django # pylint-plugin-utils @@ -447,13 +434,8 @@ pytest==8.2.2 # pytest-xdist pytest-django==4.8.0 # via -r requirements-dev.in -<<<<<<< HEAD pytest-order==1.2.1 # via -r requirements-dev.in -pytest-sugar==0.9.7 -======= -pytest-sugar==1.0.0 ->>>>>>> 9e6b9a1e (wip: Add KC-client and basic methods, signal handler) # via -r requirements-dev.in pytest-xdist==3.6.1 # via -r requirements-dev.in @@ -647,17 +629,11 @@ wagtail-headless-preview==0.8.0 # via wagtail-grapple wagtail-localize==1.9 # via -r requirements.in -<<<<<<< HEAD -watchfiles==0.19.0 - # via uvicorn -wcwidth==0.2.6 -======= watchfiles==0.22.0 # via # django-watchfiles # uvicorn wcwidth==0.2.13 ->>>>>>> 9e6b9a1e (wip: Add KC-client and basic methods, signal handler) # via prompt-toolkit webencodings==0.5.1 # via html5lib @@ -667,17 +643,10 @@ wheel==0.43.0 # via pip-tools whitenoise[brotli]==6.6.0 # via -r requirements.in -<<<<<<< HEAD -willow[heif]==1.6.1 - # via wagtail -wrapt==1.15.0 - # via astroid -======= willow[heif]==1.6.3 # via # wagtail # willow ->>>>>>> 9e6b9a1e (wip: Add KC-client and basic methods, signal handler) # The following packages are considered to be unsafe in a requirements file: # pip diff --git a/server/vbv_lernwelt/shop/invoice/abacus.py b/server/vbv_lernwelt/shop/invoice/abacus.py index 1bc7cd2d..def231ef 100644 --- a/server/vbv_lernwelt/shop/invoice/abacus.py +++ b/server/vbv_lernwelt/shop/invoice/abacus.py @@ -75,9 +75,11 @@ def create_customer_xml(checkout_information: CheckoutInformation): abacus_debitor_number=customer.abacus_debitor_number, last_name=checkout_information.last_name, first_name=checkout_information.first_name, - company_name=checkout_information.organisation_detail_name - if checkout_information.invoice_address == "org" - else "", + company_name=( + checkout_information.organisation_detail_name + if checkout_information.invoice_address == "org" + else "" + ), street=( checkout_information.organisation_street if checkout_information.invoice_address == "org" @@ -145,14 +147,14 @@ def render_invoice_xml( SubElement(sales_order_header_fields, "PaymentCode").text = "9999" # Skender: Bestellzeitpunkt - SubElement( - sales_order_header_fields, "PurchaseOrderDate" - ).text = order_date.isoformat() + SubElement(sales_order_header_fields, "PurchaseOrderDate").text = ( + order_date.isoformat() + ) # Skender: ePayment: TRANSACTION-ID von Datatrans in Bestellreferenz - SubElement( - sales_order_header_fields, "ReferencePurchaseOrder" - ).text = datatrans_transaction_id + SubElement(sales_order_header_fields, "ReferencePurchaseOrder").text = ( + datatrans_transaction_id + ) # Skender: ePayment: OrderID. max 10 Ziffern, erste Ziffer abhängig von der Plattform (4 = LMS, 6 = myVBV, 7 = EduManager) SubElement(sales_order_header_fields, "GroupingNumberAscii1").text = str( diff --git a/server/vbv_lernwelt/sso/role_sync/services.py b/server/vbv_lernwelt/sso/role_sync/services.py index e88c25f0..f3c2c563 100644 --- a/server/vbv_lernwelt/sso/role_sync/services.py +++ b/server/vbv_lernwelt/sso/role_sync/services.py @@ -48,7 +48,7 @@ def _handle_add_remove_action( action: SsoSyncError.Action, ): user_id = user.additional_json_data.get("intermediate_sso_id", "") - if keycloak_admin and user_id: + if settings.OAUTH_SYNC_ROLES and user_id: request_roles = _get_role_request_data(course_roles) if not request_roles: return False @@ -65,7 +65,7 @@ def _handle_add_remove_action( def update_roles_for_user( user: User, add_course_roles: CourseRolesType, remove_course_roles: CourseRolesType ): - if keycloak_admin: + if settings.OAUTH_SYNC_ROLES: remove_ret_value = remove_roles_from_user(user, remove_course_roles) add_ret_value = add_roles_to_user(user, add_course_roles) return remove_ret_value and add_ret_value @@ -73,7 +73,7 @@ def update_roles_for_user( def sync_roles_for_user(user: User, course_roles: CourseRolesType): - if keycloak_admin: + if settings.OAUTH_SYNC_ROLES: user_id = user.additional_json_data.get("intermediate_sso_id", "") if user_id: assigned_roles = _filter_non_myvbv_roles(