Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPSH-1544: UEM Inbetriebnahme-Passwort erzeugen #820

Merged
merged 17 commits into from
Dec 12, 2024
Merged

Conversation

DPDS93CT
Copy link
Contributor

@DPDS93CT DPDS93CT commented Dec 5, 2024

Description

  • add endpoint PATCH api/person/:personId/uem-password to (re)set userPassword for user in LDAP: whole action is synchron, that way FE can be informed about any failures during modification process in LDAP
  • DBiamPersonenzuordnungResponse now also includes RollenArt
  • remove PersonRepository reference from LdapClientService to avoid ref-circle (LdapClientService for the moment has to be used directly, synchronously from the PersonController to guarantee the behaviour mentioned above
  • adjust some Email-Events to contain also the personReferrer
  • add getPersonIfAllowedOrRequesterIsPerson to PersonRepository
  • add PersonReferrer as flavored-type
  • add error for PersonPasswordModificationError

Links to Tickets or other pull requests

Changes

Datasecurity

Deployment

New Repos, NPM pakages or vendor scripts

Approval for review

  • QA: In addition to review, the code has been manually tested (if manual testing is possible)
  • All points were discussed with the ticket creator, support-team or product owner. The code upholds all quality guidelines from the PR-template.

…ain referrer, add resetUEMPasswordByPersonId in PersonController, add PersonReferrer-type
@DPDS93CT DPDS93CT marked this pull request as draft December 5, 2024 13:16
@DPDS93CT DPDS93CT marked this pull request as ready for review December 6, 2024 12:03
@DPDS93CT DPDS93CT changed the base branch from release-1.0 to release-1.1 December 9, 2024 08:46
@DPDS93CT DPDS93CT changed the base branch from release-1.1 to release-0101 December 9, 2024 10:13
@DPDS93CT DPDS93CT requested a review from marode-cap December 11, 2024 09:09
@YoussefBouch YoussefBouch merged commit 8f74727 into release-0101 Dec 12, 2024
31 checks passed
@YoussefBouch YoussefBouch deleted the SPSH-1544 branch December 12, 2024 09:11
kristoff-kiefer added a commit that referenced this pull request Dec 18, 2024
* implementing Schulzuweisung to ldap

* adding  containsAnyCurrentPKWithRollenartLehr() funktion to personenkontext-updated.events

* fix tests

* remove comment

* implementing tests for removePersonFromGroup

* adding tests for addPersonToGroup

* copying ldap event handler tests from main

* adding !pk.orgaKennung tests

* add test for addPersonToGroup in createLehrer

* fixing tests for addPersonToGroup

* adjust error handling

* test for new error handling

* rename

* no async inside Promise

* log failed promise results

* remove unnecessary import

* remove logging because error message isnt present

* fix test

* add logging

* Spsh 1580 (#831)

Spsh 1580

* Fixed rolle name (#840)

* refactoring

* SPSH-1584: OX: E-Mail Adresse bei Namensänderung wird nicht angepasst (#826)

* adjust OXUserChange (renaming user) to set referrer as OxUserName also adjust evnet regarding ID_OX in KC

* expect more info-logging in test cases for OxEventHandler

* SPSH-1592 (#828)

* add personID to some logs in OxEventHandler and EmailEventHandler

* log warning if multiple REQUESTED emailAddresses can be found for person

* log warning when multiple REQUESTED emailAddresses found for personId

* SPSH-1544: UEM Inbetriebnahme-Passwort erzeugen (#820)

* rm PersonRepository-ref in LdapClientSvc, adjust Email-events to contain referrer, add resetUEMPasswordByPersonId in PersonController, add PersonReferrer-type

* fix existing test cases

* add test cases after adjusting LDAPClientSvc

* remove dead imports and comments

* add RollenArt to DBiamPersonenzuordnungResponse

* remove StepUp-Guard for Reset-UEM-password

* allow Lehrer to use UEM-password-reset for themselves

* undo StepUpGuard-disabling for creating person with kontexte via POST

* adjust i18 for Person-UEM-Password, adjust test cases

---------

Co-authored-by: Youssef Bouchara <[email protected]>

* SPSH-1626 itslearning correlation-IDs (#839)

* Add syncID to itslearning requests and logs

* Fix linter warnings

* Fix coverage

* fixing addPersonToGroup

* SPSH-1583: Refaktorisierung OX-User-Blacklist (#829)

* create OxUserBlacklistEntry, OxUserBlacklistRepo

* use OxUserBlacklistRepo in UsernameGeneratorService

* fix test-cases which use UsernameGenerator to provide OxUserBlacklistRepo

* add test-cases for OxUserBlacklistRepo

* fix imports in modules and test-files

* rm unused import

* refactor LDAP client service and event handler for improved organization and member checks

* implementing uid rename in groups by PersonRenamedEvent

* fixing tests for removePersonFromGroup

* fixing tests

* fixing coverage

* test coverage

* implementing base_dn config

* linting

* fix configloader tests

* fixing coverage

* fixing coverage

* adding dynamic root group

* refactoring

* refactoring

* adjust config-loader to NOT convert values implicitly (#841)

* refactoring values.yml

* handling error when deleting non existing Lehrer

* fix coverage

---------

Co-authored-by: Timo K <[email protected]>
Co-authored-by: Youssef Bouchara <[email protected]>
Co-authored-by: Cornelius <[email protected]>
Co-authored-by: Marvin Rode (Cap) <[email protected]>
Co-authored-by: Kristoff Kiefer <[email protected]>
kristoff-kiefer added a commit that referenced this pull request Dec 18, 2024
* Spsh 1580 (#831)

Spsh 1580

* Fixed rolle name (#840)

* SPSH-1584: OX: E-Mail Adresse bei Namensänderung wird nicht angepasst (#826)

* adjust OXUserChange (renaming user) to set referrer as OxUserName also adjust evnet regarding ID_OX in KC

* expect more info-logging in test cases for OxEventHandler

* SPSH-1592 (#828)

* add personID to some logs in OxEventHandler and EmailEventHandler

* log warning if multiple REQUESTED emailAddresses can be found for person

* log warning when multiple REQUESTED emailAddresses found for personId

* SPSH-1544: UEM Inbetriebnahme-Passwort erzeugen (#820)

* rm PersonRepository-ref in LdapClientSvc, adjust Email-events to contain referrer, add resetUEMPasswordByPersonId in PersonController, add PersonReferrer-type

* fix existing test cases

* add test cases after adjusting LDAPClientSvc

* remove dead imports and comments

* add RollenArt to DBiamPersonenzuordnungResponse

* remove StepUp-Guard for Reset-UEM-password

* allow Lehrer to use UEM-password-reset for themselves

* undo StepUpGuard-disabling for creating person with kontexte via POST

* adjust i18 for Person-UEM-Password, adjust test cases

---------

Co-authored-by: Youssef Bouchara <[email protected]>

* SPSH-1626 itslearning correlation-IDs (#839)

* Add syncID to itslearning requests and logs

* Fix linter warnings

* Fix coverage

* SPSH-1583: Refaktorisierung OX-User-Blacklist (#829)

* create OxUserBlacklistEntry, OxUserBlacklistRepo

* use OxUserBlacklistRepo in UsernameGeneratorService

* fix test-cases which use UsernameGenerator to provide OxUserBlacklistRepo

* add test-cases for OxUserBlacklistRepo

* fix imports in modules and test-files

* rm unused import

* adjust config-loader to NOT convert values implicitly (#841)

---------

Co-authored-by: Timo K <[email protected]>
Co-authored-by: Youssef Bouchara <[email protected]>
Co-authored-by: Cornelius <[email protected]>
Co-authored-by: Marvin Rode (Cap) <[email protected]>
kristoff-kiefer added a commit that referenced this pull request Dec 18, 2024
* implementing Schulzuweisung to ldap

* adding  containsAnyCurrentPKWithRollenartLehr() funktion to personenkontext-updated.events

* fix tests

* remove comment

* implementing tests for removePersonFromGroup

* adding tests for addPersonToGroup

* copying ldap event handler tests from main

* adding !pk.orgaKennung tests

* add test for addPersonToGroup in createLehrer

* fixing tests for addPersonToGroup

* adjust error handling

* test for new error handling

* rename

* no async inside Promise

* log failed promise results

* remove unnecessary import

* remove logging because error message isnt present

* fix test

* add logging

* Spsh 1580 (#831)

Spsh 1580

* Fixed rolle name (#840)

* refactoring

* SPSH-1584: OX: E-Mail Adresse bei Namensänderung wird nicht angepasst (#826)

* adjust OXUserChange (renaming user) to set referrer as OxUserName also adjust evnet regarding ID_OX in KC

* expect more info-logging in test cases for OxEventHandler

* SPSH-1592 (#828)

* add personID to some logs in OxEventHandler and EmailEventHandler

* log warning if multiple REQUESTED emailAddresses can be found for person

* log warning when multiple REQUESTED emailAddresses found for personId

* SPSH-1544: UEM Inbetriebnahme-Passwort erzeugen (#820)

* rm PersonRepository-ref in LdapClientSvc, adjust Email-events to contain referrer, add resetUEMPasswordByPersonId in PersonController, add PersonReferrer-type

* fix existing test cases

* add test cases after adjusting LDAPClientSvc

* remove dead imports and comments

* add RollenArt to DBiamPersonenzuordnungResponse

* remove StepUp-Guard for Reset-UEM-password

* allow Lehrer to use UEM-password-reset for themselves

* undo StepUpGuard-disabling for creating person with kontexte via POST

* adjust i18 for Person-UEM-Password, adjust test cases

---------

Co-authored-by: Youssef Bouchara <[email protected]>

* SPSH-1626 itslearning correlation-IDs (#839)

* Add syncID to itslearning requests and logs

* Fix linter warnings

* Fix coverage

* fixing addPersonToGroup

* SPSH-1583: Refaktorisierung OX-User-Blacklist (#829)

* create OxUserBlacklistEntry, OxUserBlacklistRepo

* use OxUserBlacklistRepo in UsernameGeneratorService

* fix test-cases which use UsernameGenerator to provide OxUserBlacklistRepo

* add test-cases for OxUserBlacklistRepo

* fix imports in modules and test-files

* rm unused import

* refactor LDAP client service and event handler for improved organization and member checks

* implementing uid rename in groups by PersonRenamedEvent

* fixing tests for removePersonFromGroup

* fixing tests

* fixing coverage

* test coverage

* implementing base_dn config

* linting

* fix configloader tests

* fixing coverage

* fixing coverage

* adding dynamic root group

* refactoring

* refactoring

* adjust config-loader to NOT convert values implicitly (#841)

* refactoring values.yml

* handling error when deleting non existing Lehrer

* fix coverage

---------

Co-authored-by: Alexander Ungefug <[email protected]>
Co-authored-by: Timo K <[email protected]>
Co-authored-by: Youssef Bouchara <[email protected]>
Co-authored-by: Cornelius <[email protected]>
Co-authored-by: Kristoff Kiefer <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants