For consistency we should use RunAs in sudo labels and not Run As.

The API changes don't affect the wire API, label is in there to make one think twice about making changes :-)

https://fedorahosted.org/freeipa/ticket/1328
>From 59b9918c69fabd71b6e4e97b09799b65e47591cb Mon Sep 17 00:00:00 2001
From: Rob Crittenden <rcrit...@redhat.com>
Date: Wed, 29 Jun 2011 15:09:29 -0400
Subject: [PATCH] In sudo labels we should use RunAs and not Run As.

https://fedorahosted.org/freeipa/ticket/1328
---
 API.txt                    |   12 ++++++------
 ipalib/plugins/sudorule.py |   12 ++++++------
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/API.txt b/API.txt
index c89b09d2b03efbcb0d19d70a53a1ae627aa8e778..acc7d0b70694736d72cfd85a8baf093380691488 100644
--- a/API.txt
+++ b/API.txt
@@ -2319,8 +2319,8 @@ option: Str('description', attribute=True, cli_name='desc', label=Gettext('Descr
 option: StrEnum('usercategory', attribute=True, cli_name='usercat', label=Gettext('User category', domain='ipa', localedir=None), multivalue=False, required=False, values=(u'all',))
 option: StrEnum('hostcategory', attribute=True, cli_name='hostcat', label=Gettext('Host category', domain='ipa', localedir=None), multivalue=False, required=False, values=(u'all',))
 option: StrEnum('cmdcategory', attribute=True, cli_name='cmdcat', label=Gettext('Command category', domain='ipa', localedir=None), multivalue=False, required=False, values=(u'all',))
-option: StrEnum('ipasudorunasusercategory', attribute=True, cli_name='runasusercat', label=Gettext('Run As User category', domain='ipa', localedir=None), multivalue=False, required=False, values=(u'all',))
-option: StrEnum('ipasudorunasgroupcategory', attribute=True, cli_name='runasgroupcat', label=Gettext('Run As Group category', domain='ipa', localedir=None), multivalue=False, required=False, values=(u'all',))
+option: StrEnum('ipasudorunasusercategory', attribute=True, cli_name='runasusercat', label=Gettext('RunAs User category', domain='ipa', localedir=None), multivalue=False, required=False, values=(u'all',))
+option: StrEnum('ipasudorunasgroupcategory', attribute=True, cli_name='runasgroupcat', label=Gettext('RunAs Group category', domain='ipa', localedir=None), multivalue=False, required=False, values=(u'all',))
 option: Str('externaluser', attribute=True, cli_name='externaluser', label=Gettext('External User', domain='ipa', localedir=None), multivalue=False, required=False)
 option: Str('ipasudorunasextuser', attribute=True, cli_name='runasexternaluser', label=Gettext('RunAs External User', domain='ipa', localedir=None), multivalue=False, required=False)
 option: Str('ipasudorunasextgroup', attribute=True, cli_name='runasexternalgroup', label=Gettext('RunAs External Group', domain='ipa', localedir=None), multivalue=False, required=False)
@@ -2425,8 +2425,8 @@ option: Str('description', attribute=True, autofill=False, cli_name='desc', labe
 option: StrEnum('usercategory', attribute=True, autofill=False, cli_name='usercat', label=Gettext('User category', domain='ipa', localedir=None), multivalue=False, query=True, required=False, values=(u'all',))
 option: StrEnum('hostcategory', attribute=True, autofill=False, cli_name='hostcat', label=Gettext('Host category', domain='ipa', localedir=None), multivalue=False, query=True, required=False, values=(u'all',))
 option: StrEnum('cmdcategory', attribute=True, autofill=False, cli_name='cmdcat', label=Gettext('Command category', domain='ipa', localedir=None), multivalue=False, query=True, required=False, values=(u'all',))
-option: StrEnum('ipasudorunasusercategory', attribute=True, autofill=False, cli_name='runasusercat', label=Gettext('Run As User category', domain='ipa', localedir=None), multivalue=False, query=True, required=False, values=(u'all',))
-option: StrEnum('ipasudorunasgroupcategory', attribute=True, autofill=False, cli_name='runasgroupcat', label=Gettext('Run As Group category', domain='ipa', localedir=None), multivalue=False, query=True, required=False, values=(u'all',))
+option: StrEnum('ipasudorunasusercategory', attribute=True, autofill=False, cli_name='runasusercat', label=Gettext('RunAs User category', domain='ipa', localedir=None), multivalue=False, query=True, required=False, values=(u'all',))
+option: StrEnum('ipasudorunasgroupcategory', attribute=True, autofill=False, cli_name='runasgroupcat', label=Gettext('RunAs Group category', domain='ipa', localedir=None), multivalue=False, query=True, required=False, values=(u'all',))
 option: Str('externaluser', attribute=True, autofill=False, cli_name='externaluser', label=Gettext('External User', domain='ipa', localedir=None), multivalue=False, query=True, required=False)
 option: Str('ipasudorunasextuser', attribute=True, autofill=False, cli_name='runasexternaluser', label=Gettext('RunAs External User', domain='ipa', localedir=None), multivalue=False, query=True, required=False)
 option: Str('ipasudorunasextgroup', attribute=True, autofill=False, cli_name='runasexternalgroup', label=Gettext('RunAs External Group', domain='ipa', localedir=None), multivalue=False, query=True, required=False)
@@ -2446,8 +2446,8 @@ option: Str('description', attribute=True, autofill=False, cli_name='desc', labe
 option: StrEnum('usercategory', attribute=True, autofill=False, cli_name='usercat', label=Gettext('User category', domain='ipa', localedir=None), multivalue=False, required=False, values=(u'all',))
 option: StrEnum('hostcategory', attribute=True, autofill=False, cli_name='hostcat', label=Gettext('Host category', domain='ipa', localedir=None), multivalue=False, required=False, values=(u'all',))
 option: StrEnum('cmdcategory', attribute=True, autofill=False, cli_name='cmdcat', label=Gettext('Command category', domain='ipa', localedir=None), multivalue=False, required=False, values=(u'all',))
-option: StrEnum('ipasudorunasusercategory', attribute=True, autofill=False, cli_name='runasusercat', label=Gettext('Run As User category', domain='ipa', localedir=None), multivalue=False, required=False, values=(u'all',))
-option: StrEnum('ipasudorunasgroupcategory', attribute=True, autofill=False, cli_name='runasgroupcat', label=Gettext('Run As Group category', domain='ipa', localedir=None), multivalue=False, required=False, values=(u'all',))
+option: StrEnum('ipasudorunasusercategory', attribute=True, autofill=False, cli_name='runasusercat', label=Gettext('RunAs User category', domain='ipa', localedir=None), multivalue=False, required=False, values=(u'all',))
+option: StrEnum('ipasudorunasgroupcategory', attribute=True, autofill=False, cli_name='runasgroupcat', label=Gettext('RunAs Group category', domain='ipa', localedir=None), multivalue=False, required=False, values=(u'all',))
 option: Str('externaluser', attribute=True, autofill=False, cli_name='externaluser', label=Gettext('External User', domain='ipa', localedir=None), multivalue=False, required=False)
 option: Str('ipasudorunasextuser', attribute=True, autofill=False, cli_name='runasexternaluser', label=Gettext('RunAs External User', domain='ipa', localedir=None), multivalue=False, required=False)
 option: Str('ipasudorunasextgroup', attribute=True, autofill=False, cli_name='runasexternalgroup', label=Gettext('RunAs External Group', domain='ipa', localedir=None), multivalue=False, required=False)
diff --git a/ipalib/plugins/sudorule.py b/ipalib/plugins/sudorule.py
index a85e943f8017881af1ed348d5862a6a613d25798..50ef832b27d7fce7c6d01cd71d00d8b20c43b565 100644
--- a/ipalib/plugins/sudorule.py
+++ b/ipalib/plugins/sudorule.py
@@ -102,14 +102,14 @@ class sudorule(LDAPObject):
         ),
         StrEnum('ipasudorunasusercategory?',
             cli_name='runasusercat',
-            label=_('Run As User category'),
-            doc=_('Run As User category the rule applies to'),
+            label=_('RunAs User category'),
+            doc=_('RunAs User category the rule applies to'),
             values=(u'all', ),
         ),
         StrEnum('ipasudorunasgroupcategory?',
             cli_name='runasgroupcat',
-            label=_('Run As Group category'),
-            doc=_('Run As Group category the rule applies to'),
+            label=_('RunAs Group category'),
+            doc=_('RunAs Group category the rule applies to'),
             values=(u'all', ),
         ),
         Str('memberuser_user?',
@@ -145,11 +145,11 @@ class sudorule(LDAPObject):
             flags=['no_create', 'no_update', 'no_search'],
         ),
         Str('ipasudorunas_user?',
-            label=_('Run As User'),
+            label=_('RunAs User'),
             flags=['no_create', 'no_update', 'no_search'],
         ),
         Str('ipasudorunas_group?',
-            label=_('Run As Group'),
+            label=_('RunAs Group'),
             flags=['no_create', 'no_update', 'no_search'],
         ),
         Str('externaluser?',
-- 
1.7.4

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to