Allow RDN changes for users, groups, rolegroups and taskgroups.
To do a change right now you have to perform a setattr like: ipa user-mod --setattr uid=newuser olduser The RDN change is performed before the rest of the mods. If the RDN change is the only change done then the EmptyModlist that update_entry() throws is ignored. ticket 323
This commit is contained in:
1 parent
93290c8a72
commit
70a57924c8
11 files changed
+196
No files matched your search
@@ -32,6 +32,7 @@ taskgroup1 = u'test-taskgroup-1'
|
||||
taskgroup1_dn = u'cn=%s,cn=taskgroups,cn=accounts,%s' % (
|
||||
taskgroup1, api.env.basedn
|
||||
)
|
||||
renamedtaskgroup1 = u'test-taskgroup1'
|
||||
|
||||
taskgroup2 = u'test-taskgroup-2'
|
||||
taskgroup2_dn = u'cn=%s,cn=taskgroups,cn=accounts,%s' % (
|
||||
@@ -79,6 +80,13 @@ class test_taskgroup(Declarative):
|
||||
),
|
||||
|
||||
|
||||
dict(
|
||||
desc='Try to rename non-existent %r' % taskgroup1,
|
||||
command=('taskgroup_del', [taskgroup1], dict(setattr=u'cn=%s' % renamedtaskgroup1)),
|
||||
expected=errors.NotFound(reason='no such entry'),
|
||||
),
|
||||
|
||||
|
||||
dict(
|
||||
desc='Search for non-existent %r' % taskgroup1,
|
||||
command=('taskgroup_find', [taskgroup1], {}),
|
||||
@@ -361,6 +369,36 @@ class test_taskgroup(Declarative):
|
||||
),
|
||||
|
||||
|
||||
dict(
|
||||
desc='Rename %r' % taskgroup1,
|
||||
command=('taskgroup_mod', [taskgroup1], dict(setattr=u'cn=%s' % renamedtaskgroup1)),
|
||||
expected=dict(
|
||||
value=taskgroup1,
|
||||
result=dict(
|
||||
cn=[renamedtaskgroup1],
|
||||
description=[u'New desc 1'],
|
||||
member_rolegroup=[u'test-rolegroup-1'],
|
||||
),
|
||||
summary=u'Modified taskgroup "%s"' % taskgroup1
|
||||
)
|
||||
),
|
||||
|
||||
|
||||
dict(
|
||||
desc='Rename %r back' % renamedtaskgroup1,
|
||||
command=('taskgroup_mod', [renamedtaskgroup1], dict(setattr=u'cn=%s' % taskgroup1)),
|
||||
expected=dict(
|
||||
value=renamedtaskgroup1,
|
||||
result=dict(
|
||||
cn=[taskgroup1],
|
||||
description=[u'New desc 1'],
|
||||
member_rolegroup=[u'test-rolegroup-1'],
|
||||
),
|
||||
summary=u'Modified taskgroup "%s"' % renamedtaskgroup1
|
||||
)
|
||||
),
|
||||
|
||||
|
||||
dict(
|
||||
desc='Delete %r' % taskgroup1,
|
||||
command=('taskgroup_del', [taskgroup1], {}),
|
||||
|
||||
Reference in new issue
Block a user