mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-11 00:31:56 -06:00
permission: handle ipapermright deprecated CLI alias on the client
https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
This commit is contained in:
parent
71de8878bd
commit
3ec7a52aea
6
API.txt
6
API.txt
@ -3364,7 +3364,7 @@ option: Str('extratargetfilter*', cli_name='filter')
|
||||
option: Str('filter*')
|
||||
option: StrEnum('ipapermbindruletype', autofill=True, cli_name='bindtype', default=u'permission', values=[u'permission', u'all', u'anonymous'])
|
||||
option: DNOrURL('ipapermlocation?', alwaysask=True, autofill=False, cli_name='subtree')
|
||||
option: StrEnum('ipapermright*', alwaysask=True, autofill=False, cli_name='right', deprecated_cli_aliases=['permissions'], values=[u'read', u'search', u'compare', u'write', u'add', u'delete', u'all'])
|
||||
option: StrEnum('ipapermright*', alwaysask=True, autofill=False, cli_name='right', values=[u'read', u'search', u'compare', u'write', u'add', u'delete', u'all'])
|
||||
option: DNParam('ipapermtarget?', cli_name='target')
|
||||
option: Str('ipapermtargetfilter*', cli_name='rawfilter')
|
||||
option: DNParam('ipapermtargetfrom?', cli_name='targetfrom')
|
||||
@ -3425,7 +3425,7 @@ option: Str('ipapermdefaultattr*', autofill=False, cli_name='defaultattrs')
|
||||
option: Str('ipapermexcludedattr*', autofill=False, cli_name='excludedattrs')
|
||||
option: Str('ipapermincludedattr*', autofill=False, cli_name='includedattrs')
|
||||
option: DNOrURL('ipapermlocation?', autofill=False, cli_name='subtree')
|
||||
option: StrEnum('ipapermright*', autofill=False, cli_name='right', deprecated_cli_aliases=['permissions'], values=[u'read', u'search', u'compare', u'write', u'add', u'delete', u'all'])
|
||||
option: StrEnum('ipapermright*', autofill=False, cli_name='right', values=[u'read', u'search', u'compare', u'write', u'add', u'delete', u'all'])
|
||||
option: DNParam('ipapermtarget?', autofill=False, cli_name='target')
|
||||
option: Str('ipapermtargetfilter*', autofill=False, cli_name='rawfilter')
|
||||
option: DNParam('ipapermtargetfrom?', autofill=False, cli_name='targetfrom')
|
||||
@ -3458,7 +3458,7 @@ option: StrEnum('ipapermbindruletype?', autofill=False, cli_name='bindtype', def
|
||||
option: Str('ipapermexcludedattr*', autofill=False, cli_name='excludedattrs')
|
||||
option: Str('ipapermincludedattr*', autofill=False, cli_name='includedattrs')
|
||||
option: DNOrURL('ipapermlocation?', autofill=False, cli_name='subtree')
|
||||
option: StrEnum('ipapermright*', autofill=False, cli_name='right', deprecated_cli_aliases=['permissions'], values=[u'read', u'search', u'compare', u'write', u'add', u'delete', u'all'])
|
||||
option: StrEnum('ipapermright*', autofill=False, cli_name='right', values=[u'read', u'search', u'compare', u'write', u'add', u'delete', u'all'])
|
||||
option: DNParam('ipapermtarget?', autofill=False, cli_name='target')
|
||||
option: Str('ipapermtargetfilter*', autofill=False, cli_name='rawfilter')
|
||||
option: DNParam('ipapermtargetfrom?', autofill=False, cli_name='targetfrom')
|
||||
|
31
ipaclient/plugins/permission.py
Normal file
31
ipaclient/plugins/permission.py
Normal file
@ -0,0 +1,31 @@
|
||||
#
|
||||
# Copyright (C) 2016 FreeIPA Contributors see COPYING for license
|
||||
#
|
||||
|
||||
from ipaclient.frontend import MethodOverride
|
||||
from ipalib.plugable import Registry
|
||||
|
||||
register = Registry()
|
||||
|
||||
|
||||
class PermissionMethodOverride(MethodOverride):
|
||||
def get_options(self):
|
||||
for option in super(PermissionMethodOverride, self).get_options():
|
||||
if option.name == 'ipapermright':
|
||||
option = option.clone(deprecated_cli_aliases={'permissions'})
|
||||
yield option
|
||||
|
||||
|
||||
@register(override=True)
|
||||
class permission_add(PermissionMethodOverride):
|
||||
pass
|
||||
|
||||
|
||||
@register(override=True)
|
||||
class permission_mod(PermissionMethodOverride):
|
||||
pass
|
||||
|
||||
|
||||
@register(override=True)
|
||||
class permission_find(PermissionMethodOverride):
|
||||
pass
|
@ -243,7 +243,6 @@ class permission(baseldap.LDAPObject):
|
||||
StrEnum(
|
||||
'ipapermright*',
|
||||
cli_name='right',
|
||||
deprecated_cli_aliases={'permissions'},
|
||||
label=_('Granted rights'),
|
||||
doc=_('Rights to grant '
|
||||
'(read, search, compare, write, add, delete, all)'),
|
||||
|
Loading…
Reference in New Issue
Block a user