summaryrefslogtreecommitdiffstats
path: root/ipatests
diff options
context:
space:
mode:
authorAna Krivokapic <akrivoka@redhat.com>2013-11-12 11:03:28 +0100
committerPetr Viktorin <pviktori@redhat.com>2013-11-19 14:27:50 +0100
commitb216a7b6106be3a9e4b60144ca237dc3cedd8112 (patch)
treeed457dd92b3c8a7cd74edfcbac1c984a1252afab /ipatests
parent2bc7803b69d15a246486ab5c8a44ead7593e8e90 (diff)
downloadfreeipa-b216a7b6106be3a9e4b60144ca237dc3cedd8112.tar.gz
freeipa-b216a7b6106be3a9e4b60144ca237dc3cedd8112.tar.xz
freeipa-b216a7b6106be3a9e4b60144ca237dc3cedd8112.zip
Add userClass attribute for users
This new freeform user attribute will allow provisioning systems to add custom tags for user objects which can be later used for automember rules or for additional local interpretation. Design page: http://www.freeipa.org/page/V3/Integration_with_a_provisioning_systems https://fedorahosted.org/freeipa/ticket/3588
Diffstat (limited to 'ipatests')
-rw-r--r--ipatests/test_xmlrpc/test_user_plugin.py48
1 files changed, 44 insertions, 4 deletions
diff --git a/ipatests/test_xmlrpc/test_user_plugin.py b/ipatests/test_xmlrpc/test_user_plugin.py
index 4f30ec614..2f07e1495 100644
--- a/ipatests/test_xmlrpc/test_user_plugin.py
+++ b/ipatests/test_xmlrpc/test_user_plugin.py
@@ -188,12 +188,28 @@ class test_user(Declarative):
dict(
desc='Create "%s"' % user1,
command=(
- 'user_add', [user1], dict(givenname=u'Test', sn=u'User1')
+ 'user_add',
+ [user1],
+ dict(
+ givenname=u'Test',
+ sn=u'User1',
+ userclass=u'testusers'
+ )
),
expected=dict(
value=user1,
summary=u'Added user "%s"' % user1,
- result=get_user_result(user1, u'Test', u'User1', 'add'),
+ result=get_user_result(
+ user1,
+ u'Test',
+ u'User1',
+ 'add',
+ userclass=[u'testusers'],
+ objectclass=add_oc(
+ objectclasses.user,
+ u'ipantuserattrs'
+ ) + [u'ipauser']
+ ),
),
extra_check = upg_check,
),
@@ -215,12 +231,27 @@ class test_user(Declarative):
'user_show', [user1], {}
),
expected=dict(
- result=get_user_result(user1, u'Test', u'User1', 'show'),
+ result=get_user_result(
+ user1,
+ u'Test',
+ u'User1',
+ 'show',
+ userclass=[u'testusers']
+ ),
value=user1,
summary=None,
),
),
+ dict(
+ desc='Remove userclass for user "%s"' % user1,
+ command=('user_mod', [user1], dict(userclass=u'')),
+ expected=dict(
+ result=get_user_result(user1, u'Test', u'User1', 'mod'),
+ value=user1,
+ summary=u'Modified user "%s"' % user1,
+ ),
+ ),
dict(
desc='Search for "%s" with all=True' % user1,
@@ -229,7 +260,16 @@ class test_user(Declarative):
),
expected=dict(
result=[
- get_user_result(user1, u'Test', u'User1', 'show-all'),
+ get_user_result(
+ user1,
+ u'Test',
+ u'User1',
+ 'show-all',
+ objectclass=add_oc(
+ objectclasses.user,
+ u'ipantuserattrs'
+ ) + [u'ipauser']
+ ),
],
summary=u'1 user matched',
count=1, truncated=False,