pgreco / rpms / ipa

Forked from forks/areguera/rpms/ipa 4 years ago
Clone
Blob Blame History Raw
From f6a6555e5dff1c3132529f7671b1978eab10315e Mon Sep 17 00:00:00 2001
From: David Kupka <dkupka@redhat.com>
Date: Tue, 27 Jan 2015 16:12:19 +0100
Subject: [PATCH] idviews: Allow setting ssh public key on ipauseroverride-add

https://fedorahosted.org/freeipa/ticket/4868

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
---
 ipalib/plugins/idviews.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/ipalib/plugins/idviews.py b/ipalib/plugins/idviews.py
index 9c8721018325f56e681f168b55c31055bfd07345..aa2c89163d875a813b0b850125e522935e2ef44f 100644
--- a/ipalib/plugins/idviews.py
+++ b/ipalib/plugins/idviews.py
@@ -665,6 +665,7 @@ class idoverrideuser(baseidoverride):
     }
 
     object_class = baseidoverride.object_class + ['ipaUserOverride']
+    possible_objectclasses = ['ipasshuser', 'ipaSshGroupOfPubKeys']
     default_attributes = baseidoverride.default_attributes + [
        'homeDirectory', 'uidNumber', 'uid', 'ipaOriginalUid', 'loginShell',
        'ipaSshPubkey', 'gidNumber', 'gecos',
@@ -779,6 +780,8 @@ class idoverrideuser_add(baseidoverride_add):
         dn = super(idoverrideuser_add, self).pre_callback(ldap, dn,
                  entry_attrs, attrs_list, *keys, **options)
 
+        entry_attrs['objectclass'].append('ipasshuser')
+
         # Update the ipaOriginalUid
         self.obj.update_original_uid_reference(entry_attrs)
         return dn
-- 
2.1.0