[Freeipa-devel] Replace stageuser-add --from-delete with user-undel --to-staged

Lenka Doudova ldoudova at redhat.com
Tue Jul 28 09:36:08 UTC 2015



Dne 28.7.2015 v 11:27 Jan Cholasta napsal(a):
> Dne 27.7.2015 v 17:59 Martin Basti napsal(a):
>> On 23/07/15 14:43, Martin Basti wrote:
>>> Hello,
>>>
>>> I tried to fix #5145 and I partially succeeded.
>>>
>>> However, I cannot fix this part of ticket, where user is prompted to
>>> write name and surname.
>>>
>>> $ ipa stageuser-add tuser --from-delete
>>> First name: this will be ignored
>>> Last name: this will be also ignored
>>> ------------------------
>>> Added stage user "tuser"
>>> ------------------------
>>>
>>> As the first name and last name are mandatory attributes of
>>> stageuser-add command, but they are not needed by when the
>>> --from-delete option is used.
>>> I would like to ask how to fix this issue, IMO this will be huge hack
>>> in internal API. Or should we just document this bug as known issue
>>> (thierry wrote that this is not use case that should be used often)?
>>>
>>> The best solution would be separate command, but this idea was
>>> rejected in thread "[Freeipa-devel] User life cycle: question
>>> regarding the design"
>>>
>>> Regards
>>> Martin^2
>>>
>> Hello,
>>
>> as was mentioned before, we have issue with current internal API and the
>> stageuser-add --from-delete command.
>>
>> We discussed this today, and we did not find a nice way how to fix it,
>> so we propose this (which is IMO the best solution):
>>
>> * stageuser-add --from-delete should be deprecated
>
> +1
>
>> * create new option for user-undel: used-undel --to-staged  (or create
>> new command) that will handle moving deleted users to staged area as
>> --from-delete did.
>
> Make it new command please.
>
>>
>> Instead of stageuser-add and option --from-delete, which work totally
>> different, the command user-undel does similar operation than stage-user
>> --from-delete, it just uses different container.
>
> NACK on stuffing everything into a single command just because it does 
> something similar.

How about making it a 'stageuser-undel'? The 'user-undel' moves 
preserved user to active, so the 'stageuser-undel' would move preserved 
to staged. The action is similar, but has slightly different specifics 
(which attributes are preserved etc.), and for me the 'stageuser-undel' 
feels more natural than 'user-undel --to-staged' since it's basically 
the same as there is 'stageuser-add' for creating a staged user, not 
'user-add --to-staged'. It would be in the same style as all the other 
commands concerning operations with users in staged container.

Lenka

>
>>
>> We need to do this in 4.2.1 to affect as least as possible users.
>>
>> If you have any objections, please speak/write :)
>> Martin^2
>




More information about the Freeipa-devel mailing list