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):
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.
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):
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)
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'.
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.
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.
getting rid of 6.0.0 version since that doesn't exist