diff options
author | Petr Viktorin <pviktori@redhat.com> | 2014-03-17 15:53:06 +0100 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2014-03-24 15:44:23 +0100 |
commit | 3dcad00b946e72733cccf279ec00b426d902c867 (patch) | |
tree | 8b07e2ade1d7377100696ea4a0d8455f03e1b844 /ipalib/plugins/permission.py | |
parent | 7872b92050fbbed7d20873a8c354467a86afb63f (diff) | |
download | freeipa-3dcad00b946e72733cccf279ec00b426d902c867.tar.gz freeipa-3dcad00b946e72733cccf279ec00b426d902c867.tar.xz freeipa-3dcad00b946e72733cccf279ec00b426d902c867.zip |
permission plugin: Do not add the ipapermissionv2 for output
As with the flags, the objectclass should be returned as it is
on the entry.
https://fedorahosted.org/freeipa/ticket/4257
Reviewed-By: Martin Kosek <mkosek@redhat.com>
Diffstat (limited to 'ipalib/plugins/permission.py')
-rw-r--r-- | ipalib/plugins/permission.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/ipalib/plugins/permission.py b/ipalib/plugins/permission.py index cc842a68b..1697311d8 100644 --- a/ipalib/plugins/permission.py +++ b/ipalib/plugins/permission.py @@ -624,7 +624,7 @@ class permission(baseldap.LDAPObject): from the ACI corresponding to ``entry``. If None, ``entry`` itself is filled :param output_only: - If true, the flags are not updated to V2. + If true, the flags & objectclass are not updated to V2. Used for the -find and -show commands. :param cached_acientry: Optional pre-retreived entry that contains the existing ACI. @@ -665,10 +665,9 @@ class permission(baseldap.LDAPObject): if not output_only: target_entry['ipapermissiontype'] = ['SYSTEM', 'V2'] - - if 'ipapermissionv2' not in entry['objectclass']: - target_entry['objectclass'] = list(entry['objectclass']) + [ - u'ipapermissionv2'] + if 'ipapermissionv2' not in entry['objectclass']: + target_entry['objectclass'] = list(entry['objectclass']) + [ + u'ipapermissionv2'] target_entry['ipapermlocation'] = [self.api.env.basedn] |