pgreco / rpms / ipa

Forked from forks/areguera/rpms/ipa 4 years ago
Clone

Blame SOURCES/0105-certprofile-remove-rename-option.patch

590d18
From 4b6bd162df3eed18c124527467b9beea930169db Mon Sep 17 00:00:00 2001
590d18
From: Fraser Tweedale <ftweedal@redhat.com>
590d18
Date: Tue, 1 Sep 2015 21:04:34 -0400
590d18
Subject: [PATCH] certprofile: remove 'rename' option
590d18
590d18
The initial fix of ticket 5247 rejected renames, but left the option
590d18
behind for API compatibility.  Remove the option now, according to
590d18
the consensus that because it never worked, it is fine to remove it.
590d18
590d18
Fixes: https://fedorahosted.org/freeipa/ticket/5247
590d18
Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
590d18
---
590d18
 API.txt                       | 3 +--
590d18
 VERSION                       | 4 ++--
590d18
 ipalib/plugins/certprofile.py | 3 +--
590d18
 3 files changed, 4 insertions(+), 6 deletions(-)
590d18
590d18
diff --git a/API.txt b/API.txt
590d18
index 871ddb5b7ee8b9bbae219eac673d52ad7229edc7..5253e1585e000f39d6e185a94548037dfe54d4d8 100644
590d18
--- a/API.txt
590d18
+++ b/API.txt
590d18
@@ -731,7 +731,7 @@ output: Entry('result', <type 'dict'>, Gettext('A dictionary representing an LDA
590d18
 output: Output('summary', (<type 'unicode'>, <type 'NoneType'>), None)
590d18
 output: PrimaryKey('value', None, None)
590d18
 command: certprofile_mod
590d18
-args: 1,11,3
590d18
+args: 1,10,3
590d18
 arg: Str('cn', attribute=True, cli_name='id', multivalue=False, primary_key=True, query=True, required=True)
590d18
 option: Str('addattr*', cli_name='addattr', exclude='webui')
590d18
 option: Flag('all', autofill=True, cli_name='all', default=False, exclude='webui')
590d18
@@ -740,7 +740,6 @@ option: Str('description', attribute=True, autofill=False, cli_name='desc', mult
590d18
 option: File('file?', cli_name='file')
590d18
 option: Bool('ipacertprofilestoreissued', attribute=True, autofill=False, cli_name='store', default=True, multivalue=False, required=False)
590d18
 option: Flag('raw', autofill=True, cli_name='raw', default=False, exclude='webui')
590d18
-option: Str('rename', cli_name='rename', multivalue=False, primary_key=True, required=False)
590d18
 option: Flag('rights', autofill=True, default=False)
590d18
 option: Str('setattr*', cli_name='setattr', exclude='webui')
590d18
 option: Str('version?', exclude='webui')
590d18
diff --git a/VERSION b/VERSION
590d18
index c102e020bbbec921b0f4a2141d1c768ac093acf8..da721fdd548023dc3dcd9b4f6a8ba72922a3c6f2 100644
590d18
--- a/VERSION
590d18
+++ b/VERSION
590d18
@@ -90,5 +90,5 @@ IPA_DATA_VERSION=20100614120000
590d18
 #                                                      #
590d18
 ########################################################
590d18
 IPA_API_VERSION_MAJOR=2
590d18
-IPA_API_VERSION_MINOR=154
590d18
-# Last change: pvoborni - change default vault type to 'symmetric'
590d18
+IPA_API_VERSION_MINOR=155
590d18
+# Last change: ftweedal - remove certprofile 'rename' option
590d18
diff --git a/ipalib/plugins/certprofile.py b/ipalib/plugins/certprofile.py
590d18
index a0ffa38608400860994c771e4eba81304ead27be..bd835f4c241ba1936555869d481262a8093bbb42 100644
590d18
--- a/ipalib/plugins/certprofile.py
590d18
+++ b/ipalib/plugins/certprofile.py
590d18
@@ -115,7 +115,6 @@ class certprofile(LDAPObject):
590d18
     search_attributes = [
590d18
         'cn', 'description', 'ipacertprofilestoreissued'
590d18
     ]
590d18
-    rdn_is_primary_key = True
590d18
     label = _('Certificate Profiles')
590d18
     label_singular = _('Certificate Profile')
590d18
 
590d18
@@ -323,7 +322,7 @@ class certprofile_mod(LDAPUpdate):
590d18
     def pre_callback(self, ldap, dn, entry_attrs, attrs_list, *keys, **options):
590d18
         ca_enabled_check()
590d18
         # Once a profile id is set it cannot be changed
590d18
-        if 'rename' in options or 'cn' in entry_attrs:
590d18
+        if 'cn' in entry_attrs:
590d18
             raise errors.ProtectedEntryError(label='certprofile', key=keys[0],
590d18
                 reason=_('Certificate profiles cannot be renamed'))
590d18
         if 'file' in options:
590d18
-- 
590d18
2.5.1
590d18