Project

General

Profile

Actions

Bug #14692

closed

Unable to change own username through web UI

Added by Brad Buckingham almost 8 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
Web Interface
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1327661
Description of problem:
When user tries to update his username via My Account > User dialog, there is no error shown on trying to put a blank username in. Instead there is a success notification displayed but the username stays unchanged (so it's more of a cosmetic issue).

Version-Release number of selected component (if applicable):
6.2.0 snap 8.1

How reproducible:
always

Steps to Reproduce:
1. navigate to my profile
2. try to change your username to "" or " "

Actual results:
Successfully updated <username> //changes have no effect

Expected results:
"can't be blank" Error

Additional info:


Files


Related issues 1 (0 open1 closed)

Has duplicate Foreman - Bug #19946: Unable to change the User-name by the userDuplicateRahul Bajaj06/07/2017Actions
Actions #1

Updated by Dominic Cleal almost 8 years ago

How are you changing the username? The input box is disabled.

Actions #2

Updated by Brad Buckingham almost 8 years ago

  • Status changed from Need more information to New
  • Priority changed from Normal to Low

The user has Administrator role; therefore, the username is editable. If he attempts to update it, there is no error displayed; however, it seems that the user is logged out immediately and the change is not applied. Ideally, the field should be read-only or the user should see an error.

Actions #3

Updated by Dominic Cleal almost 8 years ago

  • Subject changed from WebUI - no error on updating own username to blank to No error when updating own username to blank
  • Category set to Web Interface

The reason the username field is disabled in my screenshot is that it's incorrectly made disabled when the username is 'admin'.

Actions #4

Updated by The Foreman Bot almost 8 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/3483 added
Actions #5

Updated by Daniel Lobato Garcia almost 8 years ago

I think the actual issue is that we're filtering the 'login' parameter on the controller, so the request to update the login to ' ' is never fulfilled if you're editing your own user.

More info in the PR: https://github.com/theforeman/foreman/pull/3483#issuecomment-218388480

Actions #6

Updated by Dominic Cleal over 7 years ago

  • Subject changed from No error when updating own username to blank to Unable to change own username through web UI
  • Status changed from Ready For Testing to New
  • Pull request deleted (https://github.com/theforeman/foreman/pull/3483)

PR closed due to inactivity, seems valid still.

Actions #7

Updated by Daniel Gagnon over 7 years ago

This is still an issue on latest production release. Unable to rename any user. No errors are generated, but the change does not go through.

Actions #8

Updated by Rahul Bajaj almost 7 years ago

I am a new contributor to this project and wish to work on this bug. Is this bug still valid ?

Actions #9

Updated by Rahul Bajaj almost 7 years ago

  • Assignee set to Rahul Bajaj
Actions #10

Updated by Rahul Bajaj almost 7 years ago

I am analyzing a senario - An admin is unable to change his username but he can change other users name. The other users have the option to change their own user names but after updating the form it does not actually update thier usernames.

I have also raised a ticket regarding this issue : http://projects.theforeman.org/issues/19946

I am confused to whether what is the solution to this issue: either
1) Should all the users be restricted from updating their respective usernames ? OR
2) Should they be allowed ?

Actions #11

Updated by Daniel Lobato Garcia almost 7 years ago

Rahul, No need for a new ticket.

About your question, I think it would be a mix of both:

Users can update their own names if the Auth Source of these users is Internal, but cannot update their own names if the Auth Source is LDAP-based. The reason is simply that they'll lock themselves out if they change the name (Foreman won't propagate these changes to LDAP).

Actions #12

Updated by Daniel Lobato Garcia almost 7 years ago

Feel free to take the code in https://github.com/theforeman/foreman/pull/3483#issuecomment-218388480 and base your PR off that

Actions #13

Updated by Daniel Lobato Garcia almost 7 years ago

  • Has duplicate Bug #19946: Unable to change the User-name by the user added
Actions #14

Updated by The Foreman Bot almost 7 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/4579 added
Actions #15

Updated by Rahul Bajaj over 6 years ago

  • Target version set to 1.17.0-RC1
Actions #16

Updated by Rahul Bajaj over 6 years ago

  • Target version changed from 1.17.0-RC1 to 1.17.0
Actions #17

Updated by Kavita Gaikwad over 6 years ago

  • Target version changed from 1.17.0 to 216
Actions #18

Updated by Rahul Bajaj over 6 years ago

  • Target version deleted (216)
Actions #19

Updated by Rahul Bajaj about 5 years ago

  • Status changed from Ready For Testing to Closed
Actions

Also available in: Atom PDF