Bug 734196 - Roles: Accidentally double-clicking during user removal from roles view causes lag, throws error in logs
Summary: Roles: Accidentally double-clicking during user removal from roles view cause...
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: WebUI
Version: 6.0.1
Hardware: Unspecified
OS: Unspecified
unspecified vote
Target Milestone: Unspecified
Assignee: Eric Helms
QA Contact: Katello QA List
Depends On:
Blocks: katello-blockers
TreeView+ depends on / blocked
Reported: 2011-08-29 17:31 UTC by Corey Welton
Modified: 2019-09-26 13:19 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2012-08-22 17:54:11 UTC
Target Upstream Version:

Attachments (Terms of Use)

Description Corey Welton 2011-08-29 17:31:27 UTC
Description of problem:
While in the Roles view, if user accidentally doubleclicks the "Remove" (or what becomes of it), there is a noticeable lag in the UI, and eventually an error is thrown in the background. 

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

How reproducible:

Steps to Reproduce:
1.  Create a new user, "bobthebuilder"
2.  Create a new role, "bobville construction" and navigate to it.
3.  Go to the 'users' section within this role and "Add" the user 'bobthebuilder'.
4.  Click the 'Remove' button; notice the text changes ("Removing...") but remains a link. Click this text.

Actual results:
Significant lag in the UI
eventually an error is thrown in the rails console:

ActiveRecord::RecordInvalid (Validation failed: User id can only have one same role assigned):
  app/controllers/roles_controller.rb:112:in `update'
  lib/util/threadsession.rb:77:in `thread_locals'

Rendered /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.5/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.2ms)
Rendered /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.5/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (3825.4ms)
Rendered /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.5/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (17093.8ms)

Expected results:
Should not be able to get the system in a state where one is attempting (accidentally) add/remove user multiple near-simultaneous times.
Probably should not be able to click on "Adding..." or "Removing..." -- hyperlink should be removed -- while the system is 'thinking'.

Additional info:

This might be reproducible with the Add/Adding... link as well, but i wasn't able to clearly repro it there.  I suspect that clicking and reclicking whatever link happens to be there (Add/Adding/Remove/Removing) will eventually trigger this too.

Comment 1 Eric Helms 2011-09-07 18:14:02 UTC
commit a0f3b02ba9f90c277dbb48bbadfa46b0ab34e336

Great catch on the Adding and Removing still being a clickable link.  This commit should still show the Adding/Removing but disable the button while the action is occurring.  The Addind/Removing text should appear slightly faded to indicate the disabled nature.

Comment 2 Corey Welton 2011-09-22 15:08:12 UTC
QA Verified.

Comment 5 Mike McCune 2013-08-16 18:12:40 UTC
getting rid of 6.0.0 version since that doesn't exist

Note You need to log in before you can comment on or make changes to this bug.