> On Nov 18, 2023, at 10:11, Alexander Bokovoy via FreeIPA-users 
> <[email protected]> wrote:
> 
> On Пят, 17 ліс 2023, Francis Augusto Medeiros-Logeay via FreeIPA-users wrote:
>> Hi,
>> 
>> I have a few user objects that aren’t on the cn=users.
>> 
>> How can I add an option on my plugin to allow them to change password?
>> 
>> I see that adding this:
>> 
>> Password('newpass',
>>           cli_name='newpassword',
>>           label=_('New password'),
>>           flags=['virtual_attribute'],
>>           required=False)
>>           )
>> 
>> On my python plugin (and the corresponding attribute on the ui) renders a 
>> read-only field. How can I make it writable?
> 
> See how acl_state_evaluator is implemented in IPA web UI in 
> install/ui/src/freeipa/details.js. It is used against 'userpassword' 
> attribute in install/ui/src/freeipa/user.js.
> 
> You data retrieving method should support returning access rights
> (--rights --all options in CLI). E.g. what is returned by command like 'ipa 
> user-show --rights --all username'. This is typically the case for
> anything that inherits from LDAPRetrieve class of 
> ipaserver/plugins/baseldap.py.
> 

Thanks a lot Alexander! I will check this!

The cool thing is that short after I sent this e-mail, I realized that changing 
the password via cli with `ipa mailbox-mod —password` works! 

I have to say, I’m impressed by how powerful the plugin api is and by how many 
useful things one can do with plugins. It took a while to grasp how things work 
(and I’m not saying I understand half of it), but I got now a fully working 
plugin which helped me a lot to centralize user management while allowing 
legacy/non-personal accounts.

Best,

Francis 
--
_______________________________________________
FreeIPA-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedorahosted.org/archives/list/[email protected]
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to