Univention Bugzilla – Attachment 7609 Details for
Bug 41092
e-mail property contains previous address as default
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Test script to reproduce the issue
test.py (text/x-python), 1.48 KB, created by
Jan Christoph Ebersbach
on 2016-04-21 14:02:37 CEST
(
hide
)
Description:
Test script to reproduce the issue
Filename:
MIME Type:
Creator:
Jan Christoph Ebersbach
Created:
2016-04-21 14:02:37 CEST
Size:
1.48 KB
patch
obsolete
>#!/usr/bin/python2 > ># Reproduction of problem where UDM does not clear the "e-mail" attribute from ># old "creation" code. We create users in a loop, which (via our abstraction) ># does roughly the following: > >import univention.admin.modules >import univention.admin.config >import univention.admin.objects >import univention.config_registry as ucr > >u = ucr.ConfigRegistry() >u.load() > >baseDN = u.get('ldap/base') >position_base_dn = univention.admin.uldap.position(baseDN) >binddn = 'cn=admin,%s' % baseDN >bindpwd = open('/etc/ldap.secret').read() >tls = 2 > >ldap = univention.admin.uldap.access( > host=u.get('ldap/master'), base=baseDN, > binddn=binddn, bindpw=bindpwd, start_tls=tls) >config = univention.admin.config.config() > ># Verify values >print position_base_dn >print ldap > ># Init "users" module >univention.admin.modules.update() >users = univention.admin.modules.get('users/user') >univention.admin.modules.init(ldap, position_base_dn, users) > ># Set container for new users >position_base_dn.setDn('cn=users,%s' % baseDN) > ># Create first user object >obj = users.object(config, ldap, position_base_dn) >obj.open() > >print "1" >obj['password'] = 'JDFOQHWQ67mw' >obj['lastname'] = 'Test0021' >obj['mailPrimaryAddress'] = 'test0021@SOMEDOMAIN' >obj['username'] = 'test0021' >obj['primaryGroup'] = 'cn=Domain Users,cn=groups,%s' % baseDN >obj.create() > >print "2" ># Create second user object >obj2 = users.object(config, ldap, position_base_dn) >obj2.open() > ># Demonstrate problem >assert obj2['e-mail'] == obj['e-mail'] # this should fail!
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 Raw
Actions:
View
Attachments on
bug 41092
: 7609 |
7611
|
7612