e3ffab
From f6a6555e5dff1c3132529f7671b1978eab10315e Mon Sep 17 00:00:00 2001
e3ffab
From: David Kupka <dkupka@redhat.com>
e3ffab
Date: Tue, 27 Jan 2015 16:12:19 +0100
e3ffab
Subject: [PATCH] idviews: Allow setting ssh public key on ipauseroverride-add
e3ffab
e3ffab
https://fedorahosted.org/freeipa/ticket/4868
e3ffab
e3ffab
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
e3ffab
---
e3ffab
 ipalib/plugins/idviews.py | 3 +++
e3ffab
 1 file changed, 3 insertions(+)
e3ffab
e3ffab
diff --git a/ipalib/plugins/idviews.py b/ipalib/plugins/idviews.py
e3ffab
index 9c8721018325f56e681f168b55c31055bfd07345..aa2c89163d875a813b0b850125e522935e2ef44f 100644
e3ffab
--- a/ipalib/plugins/idviews.py
e3ffab
+++ b/ipalib/plugins/idviews.py
e3ffab
@@ -665,6 +665,7 @@ class idoverrideuser(baseidoverride):
e3ffab
     }
e3ffab
 
e3ffab
     object_class = baseidoverride.object_class + ['ipaUserOverride']
e3ffab
+    possible_objectclasses = ['ipasshuser', 'ipaSshGroupOfPubKeys']
e3ffab
     default_attributes = baseidoverride.default_attributes + [
e3ffab
        'homeDirectory', 'uidNumber', 'uid', 'ipaOriginalUid', 'loginShell',
e3ffab
        'ipaSshPubkey', 'gidNumber', 'gecos',
e3ffab
@@ -779,6 +780,8 @@ class idoverrideuser_add(baseidoverride_add):
e3ffab
         dn = super(idoverrideuser_add, self).pre_callback(ldap, dn,
e3ffab
                  entry_attrs, attrs_list, *keys, **options)
e3ffab
 
e3ffab
+        entry_attrs['objectclass'].append('ipasshuser')
e3ffab
+
e3ffab
         # Update the ipaOriginalUid
e3ffab
         self.obj.update_original_uid_reference(entry_attrs)
e3ffab
         return dn
e3ffab
-- 
e3ffab
2.1.0
e3ffab