From 86cd47af0245a216324900be39be1a145bf0741b 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 afd5017be..a4c947a2a 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 d3073e52e..0a2de6ed0 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 8e60a4df8..b075bf476 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: