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