From 1af36da933cd3c788e3a48257e2f5c286e985e22 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Mon, 21 May 2012 05:03:21 -0400 Subject: Disallow setattr on no_update/no_create params Make --{set,add,del}attr fail on parameters with the no_update/no_create flag for the respective command. For attributes that can be modified, but we just don't want to display in the CLI, use the 'no_option' flag. These are "locking" attributes (ipaenabledflag, nsaccountlock) and externalhost. Document the 'no_option' flag. Add some tests. https://fedorahosted.org/freeipa/ticket/2580 --- ipalib/plugins/selinuxusermap.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ipalib/plugins/selinuxusermap.py') diff --git a/ipalib/plugins/selinuxusermap.py b/ipalib/plugins/selinuxusermap.py index e33e1016..e6179cee 100644 --- a/ipalib/plugins/selinuxusermap.py +++ b/ipalib/plugins/selinuxusermap.py @@ -18,7 +18,7 @@ # along with this program. If not, see . from ipalib import api, errors -from ipalib import Str, StrEnum +from ipalib import Str, StrEnum, Bool from ipalib.plugins.baseldap import * from ipalib import _, ngettext from ipalib.plugins.hbacrule import is_all @@ -172,9 +172,9 @@ class selinuxusermap(LDAPObject): cli_name='desc', label=_('Description'), ), - Flag('ipaenabledflag?', + Bool('ipaenabledflag?', label=_('Enabled'), - flags=['no_create', 'no_update', 'no_search'], + flags=['no_option'], ), Str('memberuser_user?', label=_('Users'), -- cgit