mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-10-24 14:17:41 -05:00
Deprecated managing users and runas user/group in sudorule add/mod
We have helpers to manage these values so they shouldn't be available via add/mod. There is no logic behind them to do the right thing. https://fedorahosted.org/freeipa/ticket/1307 https://fedorahosted.org/freeipa/ticket/1320
This commit is contained in:
1 parent
dd296eec13
commit
d8c479731e
2 files changed
+27
-15
No files matched your search
@@ -40,6 +40,18 @@ from ipalib import _, ngettext
|
||||
|
||||
topic = ('sudo', 'Commands for controlling sudo configuration')
|
||||
|
||||
def deprecated(attribute):
|
||||
raise errors.ValidationError(name=attribute, error=_('this option has been deprecated.'))
|
||||
|
||||
def validate_externaluser(ugettext, value):
|
||||
deprecated('externaluser')
|
||||
|
||||
def validate_runasextuser(ugettext, value):
|
||||
deprecated('runasexternaluser')
|
||||
|
||||
def validate_runasextgroup(ugettext, value):
|
||||
deprecated('runasexternalgroup')
|
||||
|
||||
class sudorule(LDAPObject):
|
||||
"""
|
||||
Sudo Rule management
|
||||
@@ -152,20 +164,20 @@ class sudorule(LDAPObject):
|
||||
label=_('RunAs Group'),
|
||||
flags=['no_create', 'no_update', 'no_search'],
|
||||
),
|
||||
Str('externaluser?',
|
||||
Str('externaluser?', validate_externaluser,
|
||||
cli_name='externaluser',
|
||||
label=_('External User'),
|
||||
doc=_('External User the rule applies to'),
|
||||
doc=_('External User the rule applies to (sudorule-find only)'),
|
||||
),
|
||||
Str('ipasudorunasextuser?',
|
||||
Str('ipasudorunasextuser?', validate_runasextuser,
|
||||
cli_name='runasexternaluser',
|
||||
label=_('RunAs External User'),
|
||||
doc=_('External User the commands can run as'),
|
||||
doc=_('External User the commands can run as (sudorule-find only)'),
|
||||
),
|
||||
Str('ipasudorunasextgroup?',
|
||||
Str('ipasudorunasextgroup?', validate_runasextgroup,
|
||||
cli_name='runasexternalgroup',
|
||||
label=_('RunAs External Group'),
|
||||
doc=_('External Group the commands can run as'),
|
||||
doc=_('External Group the commands can run as (sudorule-find only)'),
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
Reference in new issue
Block a user