Univention Bugzilla – Attachment 9856 Details for
Bug 48710
Self service manage contact data - frontend
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
48710.patch (text/plain), 2.13 KB, created by
Florian Best
on 2019-02-21 16:01:57 CET
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Florian Best
Created:
2019-02-21 16:01:57 CET
Size:
2.13 KB
patch
obsolete
>diff --git a/management/univention-self-service/umc/python/passwordreset/__init__.py b/management/univention-self-service/umc/python/passwordreset/__init__.py >index 11aadc7d75..84da593c65 100644 >--- a/management/univention-self-service/umc/python/passwordreset/__init__.py >+++ b/management/univention-self-service/umc/python/passwordreset/__init__.py >@@ -296,13 +296,14 @@ def get_user_attributes(self, username, password): > > user_attributes = [attr.strip() for attr in ucr.get('self-service/udm_attributes', '').split(',')] > >+ user = self.get_udm_user(username=username) > widget_descriptions = [] > label_overwrites = { > 'jpegPhoto': _('Your picture') > } > for propname in user_attributes: > prop = self.usersmod.property_descriptions.get(propname) >- if not prop: >+ if not prop or not user.has_property(propname): > continue > > widget_description = { >@@ -314,6 +315,7 @@ def get_user_attributes(self, username, password): > 'required': bool(prop.required), > 'readonly': not bool(prop.editable), > 'multivalue': bool(prop.multivalue), >+ 'value': user[propname], > } > widget_description.update(widget(prop.syntax, widget_description)) > if 'udm' in widget_description['type']: >@@ -327,9 +329,8 @@ def get_user_attributes(self, username, password): > layout = [propname for propname in user_attributes if propname in [wd['id'] for wd in widget_descriptions]] > > values = {} >- user = self.get_udm_user(username=username) > for propname in user_attributes: >- if propname in user: >+ if user.has_property(propname): > values[propname] = user[propname] > > return { >@@ -400,12 +401,11 @@ def set_user_attributes(self, username, password, attributes): > user_attributes = [attr.strip() for attr in ucr.get('self-service/udm_attributes', '').split(',')] > user = self.get_udm_user_by_dn(userdn=dn, admin=True) > for propname, value in attributes.items(): >- if propname in user_attributes: >+ if propname in user_attributes and user.has_property(propname): > user[propname] = value > user.modify() > return _("Successfully changed your contact data.") > >- > @forward_to_master > @prevent_denial_of_service > @sanitize(
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 48710
:
9853
|
9854
|
9855
| 9856