Univention Bugzilla – Bug 53718
Test users/user property accountActicationDate combined with password reset
Last modified: 2021-09-04 16:12:32 CEST
We should test the new users/user property accountActicationDate, introduced in UCS via Bug #53675, combined with password reset.
a50bc5638 Bug #53675: Add accountActivationDate to user model db6af5809 Bug #53675: Sort existing test cases 23d2e8fc2 Bug #53675: Add tests for accountActivationDate 9646c7091 Bug #53675: debian/changelog entries 3c4b8c707 Bug #53675: Merge branch 'arequate/bug53675-accountActivationDate' 935d0df7f Bug #53718: Advisory 20c34138d Bug #53718: Reduce test matrix to essential cases Package: ucs-school-lib Version: 12.2.34A~4.4.0.202108291957 Branch: ucs_4.4-0 Scope: ucs-school-4.4 Package: ucs-test-ucsschool Version: 6.0.241A~4.4.0.202108301019 Branch: ucs_4.4-0 Scope: ucs-school-4.4
I just build and installed the ucsschool.lib from my local git and got an ImportError. Do I see it correctly that this change requires a certain (not yet released) erratum for UCS 4.4-8? If that is so, we have to make a new UCS@school release for this change! Is this field actually desired/required in the UCS@school user model?
IMHO it's common practice to discuss API changes with the team maintaining a library. Proposed changes can be discussed and (p)reviewed in a git branch. Please move the commits to a branch and revert them in main. Then contact the UCS@school team to discuss the intended API change.
> Is this field actually desired/required in the UCS@school user model? I just need it for the test case. Tell me how to do this properly so I don't interfere.
(In reply to Arvid Requate from comment #4) > > Is this field actually desired/required in the UCS@school user model? > > I just need it for the test case. Tell me how to do this properly so I don't > interfere. cat > foo.py <<EOF from univention.admin.syntax import ActivationDateTimeTimezone class AccountActivationDate(Attribute): udm_name = "accountActivationDate" syntax = ActivationDateTimeTimezone import ucsschool.lib.models.user ucsschool.lib.models.user.User.accountActivationDate = AccountActivationDate(_("ActivationDate"), aka=["ActivationDate", "Aktivierungsdatum"]) EOF PYTHONSTARTUP=foo.py test.py
That's what I did in a50bc5638, but that doesn't seem to be desired.
(In reply to Arvid Requate from comment #6) > That's what I did in a50bc5638, but that doesn't seem to be desired. read carefully. My code doesn't change ucs-school-lib but only the test case code during the test run.
I reverted your changes and cherry-picked them into git:requate/53718-account-activation-date ucs-test-ucsschool (6.0.244) 23cfcfe5fdb5 | Revert Bug #53718 Bug #53675 ucs-school-lib (12.2.35) 23cfcfe5fdb5 | Revert Bug #53718 Bug #53675
Test case implemented for https://git.knut.univention.de/univention/ucs/-/issues/651 to verify that udm users/user accountActivationDate doesn't break password reset by teacher/schooladmin. Merge request: https://git.knut.univention.de/univention/ucsschool/-/merge_requests/63 Note: I could not follow the monkey patch idea, because I cannot monkey patch ucsschool.lib.models.user.User.do_create