stageuser: Add stageuser-{add,remove}-principal

https://fedorahosted.org/freeipa/ticket/6623

Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
David Kupka 2017-01-18 13:25:11 +01:00 committed by Martin Basti
parent 9c0e86530e
commit 7e2d185ba0
2 changed files with 38 additions and 0 deletions

24
API.txt
View File

@ -4773,6 +4773,17 @@ option: Str('version?')
output: Output('completed', type=[<type 'int'>]) output: Output('completed', type=[<type 'int'>])
output: Output('failed', type=[<type 'dict'>]) output: Output('failed', type=[<type 'dict'>])
output: Entry('result') output: Entry('result')
command: stageuser_add_principal/1
args: 2,4,3
arg: Str('uid', cli_name='login')
arg: Principal('krbprincipalname+', alwaysask=True, autofill=True, cli_name='principal')
option: Flag('all', autofill=True, cli_name='all', default=False)
option: Flag('no_members', autofill=True, default=False)
option: Flag('raw', autofill=True, cli_name='raw', default=False)
option: Str('version?')
output: Entry('result')
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
output: PrimaryKey('value')
command: stageuser_del/1 command: stageuser_del/1
args: 1,2,3 args: 1,2,3
arg: Str('uid+', cli_name='login') arg: Str('uid+', cli_name='login')
@ -4915,6 +4926,17 @@ option: Str('version?')
output: Output('completed', type=[<type 'int'>]) output: Output('completed', type=[<type 'int'>])
output: Output('failed', type=[<type 'dict'>]) output: Output('failed', type=[<type 'dict'>])
output: Entry('result') output: Entry('result')
command: stageuser_remove_principal/1
args: 2,4,3
arg: Str('uid', cli_name='login')
arg: Principal('krbprincipalname+', alwaysask=True, autofill=True, cli_name='principal')
option: Flag('all', autofill=True, cli_name='all', default=False)
option: Flag('no_members', autofill=True, default=False)
option: Flag('raw', autofill=True, cli_name='raw', default=False)
option: Str('version?')
output: Entry('result')
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
output: PrimaryKey('value')
command: stageuser_show/1 command: stageuser_show/1
args: 1,5,3 args: 1,5,3
arg: Str('uid', cli_name='login') arg: Str('uid', cli_name='login')
@ -6685,11 +6707,13 @@ default: stageuser_activate/1
default: stageuser_add/1 default: stageuser_add/1
default: stageuser_add_cert/1 default: stageuser_add_cert/1
default: stageuser_add_manager/1 default: stageuser_add_manager/1
default: stageuser_add_principal/1
default: stageuser_del/1 default: stageuser_del/1
default: stageuser_find/1 default: stageuser_find/1
default: stageuser_mod/1 default: stageuser_mod/1
default: stageuser_remove_cert/1 default: stageuser_remove_cert/1
default: stageuser_remove_manager/1 default: stageuser_remove_manager/1
default: stageuser_remove_principal/1
default: stageuser_show/1 default: stageuser_show/1
default: sudocmd/1 default: sudocmd/1
default: sudocmd_add/1 default: sudocmd_add/1

View File

@ -41,6 +41,8 @@ from .baseuser import (
baseuser_output_params, baseuser_output_params,
baseuser_add_cert, baseuser_add_cert,
baseuser_remove_cert, baseuser_remove_cert,
baseuser_add_principal,
baseuser_remove_principal,
baseuser_add_manager, baseuser_add_manager,
baseuser_remove_manager) baseuser_remove_manager)
from ipalib.request import context from ipalib.request import context
@ -758,3 +760,15 @@ class stageuser_add_cert(baseuser_add_cert):
class stageuser_remove_cert(baseuser_remove_cert): class stageuser_remove_cert(baseuser_remove_cert):
__doc__ = _("Remove one or more certificates to the stageuser entry") __doc__ = _("Remove one or more certificates to the stageuser entry")
msg_summary = _('Removed certificates from stageuser "%(value)s"') msg_summary = _('Removed certificates from stageuser "%(value)s"')
@register()
class stageuser_add_principal(baseuser_add_principal):
__doc__ = _('Add new principal alias to the stageuser entry')
msg_summary = _('Added new aliases to stageuser "%(value)s"')
@register()
class stageuser_remove_principal(baseuser_remove_principal):
__doc__ = _('Remove principal alias from the stageuser entry')
msg_summary = _('Removed aliases from stageuser "%(value)s"')