Univention Bugzilla – Attachment 10353 Details for
Bug 51262
Allow for users to be enabled after verifying their mail address via self service
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to enable users after completing password forgotten process
enable_upon_password_forgot.patch (text/plain), 1.18 KB, created by
Valentin Heidelberger
on 2020-05-10 10:31:33 CEST
(
hide
)
Description:
Patch to enable users after completing password forgotten process
Filename:
MIME Type:
Creator:
Valentin Heidelberger
Created:
2020-05-10 10:31:33 CEST
Size:
1.18 KB
patch
obsolete
>--- umc/python/passwordreset/__init__.py.baaaak 2020-05-09 17:16:09.540720269 +0200 >+++ umc/python/passwordreset/__init__.py.bak 2020-05-09 17:12:53.421763280 +0200 >@@ -825,7 +825,7 @@ > MODULE.error("Found token in DB for blacklisted user '{}'.".format(username)) > self.db.delete_tokens(token=token, username=username) > raise ServiceForbidden() # TokenNotFound() ? >- ret = self.udm_set_password(username, password) >+ ret = self.udm_set_password(username, password, enable=True) > self.db.delete_tokens(token=token, username=username) > if ret: > raise UMC_Error(_("Successfully changed your password."), status=200) >@@ -1035,13 +1035,15 @@ > return False > return True > >- def udm_set_password(self, username, password): >+ def udm_set_password(self, username, password, enable=False): > user = self.get_udm_user(username=username, admin=True) > if ucr.is_true('ad/member') and 'synced' in user.get('objectFlag', []): > return self.admember_set_password(username, password) > try: > user["password"] = password > user["pwdChangeNextLogin"] = 0 >+ if enable: >+ user["disabled"] = 0 > user.modify() > return True > except (udm_errors.pwToShort, udm_errors.pwQuality) as exc:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 51262
: 10353