[Openstack] Change user password (not admin)

Guillermo Alvarado stallion.ak47 at gmail.com
Wed Jun 6 18:13:46 UTC 2012


---------- Forwarded message ----------
From: Guillermo Alvarado <stallion.ak47 at gmail.com>
Date: 2012/6/6
Subject: [Openstack] Change user password (not admin)
To: openstack at lists.launchpad.net


Hi everyone!

I am trying to develop a new feature to horizon, I want to users can update
their own password.
I used this:

from horizon import api

api.user_update_password(
    request,
    request.user.id,
    form.cleaned_data['new_password'],
    admin=True
)

But  the user is logged out because in keystone.py there is this:

if not user.is_admin():
            raise exceptions.NotAuthorized

So, Only the user admin can use that method.

How can I be able to use this method with a normal user, or do you
recommend to query the database directly to modify the password in the user
table.

Thanks in advance!



-- 
_______________________________________________________________________
*
*
*Guillermo Alvarado*

   - *5549875287*
   - *3521068834*
   - *92*16338*37*

*Visita: http://galvarado.com.mx*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20120606/a7b3771c/attachment.html>


More information about the Openstack mailing list