Cannot modify username for a user

Bug #918997 reported by Adrian Moya on 2012-01-20
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Low
Gabriel Hurley

Bug Description

Edit user popup windows says: "From here you can edit users by changing their USERNAMES, emails, passwords, and tenants."

But no field for updating the username is provided.

Mike Perez (thingee) on 2012-01-23
Changed in horizon:
status: New → Confirmed
Devin Carlen (devcamcar) on 2012-01-24
Changed in horizon:
importance: Undecided → Low
milestone: none → essex-4
Tihomir Trifonov (ttrifonov) wrote :

Hello,

regarding this ticket, I have several comments on it(before maybe trying to fix it).

1. As I understand the problem here is that the popup label is wrong - the 'username' SHOULD NOT be edited. It is a read-only field along with user_id.
So maybe it needs to be just dropped from the text, and to leave it as :
"From here you can edit users by changing their emails, passwords, and tenants".
Or maybe ", and default tenant", as this is the actual behavior.

2. Maybe it is a good idea to add the 'name' of the user as a readonly field, as the user_id. See the attachment for an example. At least it is good to see the username when editing.

There is something strange here. I am using devstack setup, and for me the 'update_email' function is not working.

    def update_email(self, user, email):
        """
        Update email
        """
        # FIXME(ja): why do we have to send id in params and url?
        params = {"user": {"id": base.getid(user),
                           "email": email}}

        return self._update("/users/%s" % base.getid(user), params, "user")

This is the function in python-keystoneclient, where self._update is :

    def _update(self, url, body, response_key=None):
        resp, body = self.api.put(url, body=body)
        # PUT requests may not return a body
        if body:
            return self.resource_class(self, body[response_key])

an actual *PUT* request.

But, as I see in keystone/keystone/contrib/extensions/admin/osksadm/__init__.py

        mapper.connect("/users/{user_id}",
                    controller=user_controller,
                    action="update_user",
                    conditions=dict(method=["POST"]))
        mapper.connect("/users/{user_id}",

This supports only POST and not PUT. Maybe this is some configuration error, although I see that the versions in master branch is the same. Should this be files as a separate bug ?

Devin Carlen (devcamcar) on 2012-01-31
Changed in horizon:
assignee: nobody → Nebula (nebula)
Tihomir Trifonov (ttrifonov) wrote :

It seems this bug is related to https://bugs.launchpad.net/horizon/+bug/881606

Changed in horizon:
assignee: Nebula (nebula) → Emma Grace Steimann (emmasteimann)
Changed in horizon:
assignee: Emma Grace Steimann (emmasteimann) → Gabriel Hurley (gabriel-hurley)

Reviewed: https://review.openstack.org/4223
Committed: http://github.com/openstack/horizon/commit/d2df3ee6ed46b4934fa1a414e4bf16d74ae22ffc
Submitter: Jenkins
Branch: master

commit d2df3ee6ed46b4934fa1a414e4bf16d74ae22ffc
Author: Gabriel Hurley <email address hidden>
Date: Wed Feb 15 15:43:19 2012 -0800

    Keystone-related improvements.

      * Repairs updating for users and tenants. Fixes bug 912143.

      * Makes connection caching work for admin keystoneclient calls.
        Adds unit tests for horizon.api.keystone.keystoneclient.
        Fixes bug 933170.

      * In conjunction with this keystoneclient review
        https://review.openstack.org/#change,4133
        it takes care of the following bugs as well:

        Fixes bug 922394. Fixes bug 881606. Fixes bug 918997.

    Change-Id: Id72c99772cd214c33fd1aacf357176cf67c6f473

Changed in horizon:
status: Confirmed → Fix Committed
Thierry Carrez (ttx) on 2012-02-29
Changed in horizon:
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2012-04-05
Changed in horizon:
milestone: essex-4 → 2012.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers