Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1195637 - UI should report errors to the user when External AD UserGroup addition fails
UI should report errors to the user when External AD UserGroup addition fails
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: WebUI (Show other bugs)
6.1.0
Unspecified Unspecified
high Severity high (vote)
: Unspecified
: Unused
Assigned To: Marek Hulan
Kedar Bidarkar
http://projects.theforeman.org/issues...
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-02-24 03:36 EST by Kedar Bidarkar
Modified: 2017-02-23 15:26 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-08-12 01:27:14 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 9592 None None None 2016-04-22 10:53 EDT
Red Hat Product Errata RHSA-2015:1592 normal SHIPPED_LIVE Important: Red Hat Satellite 6.1.1 on RHEL 6 2015-08-12 05:04:35 EDT

  None (edit)
Description Kedar Bidarkar 2015-02-24 03:36:58 EST
Description of problem:

UI should report errors to the user when External AD UserGroup addition fails.


Processing by UsergroupsController#update as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"w4GDcBCBEdfi+TG0Lg7cPljNH4/96go+SS0giOfYNdY=", "usergroup"=>{"name"=>"foreman", "user_ids"=>["", "5", "", "4", "", "6", ""], "admin"=>"0", "role_ids"=>["", "11"], "external_usergroups_attributes"=>{"0"=>{"_destroy"=>"false", "name"=>"kedargrp", "auth_source_id"=>"4", "id"=>"8"}, "1"=>{"_destroy"=>"false", "name"=>"foobargroup", "auth_source_id"=>"3", "id"=>"7"}, "new_external_usergroups"=>{"_destroy"=>"false", "name"=>"", "auth_source_id"=>"3"}, "new_1424766851040"=>{"_destroy"=>"false", "name"=>"hdhdhd", "auth_source_id"=>"3"}}}, "id"=>"3-foreman"}
Failed to save: Name is not found in the authentication source

OR

Processing by UsergroupsController#update as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"w4GDcBCBEdfi+TG0Lg7cPljNH4/96go+SS0giOfYNdY=", "usergroup"=>{"name"=>"foreman", "user_ids"=>["", "5", "", "4", "", "6", ""], "admin"=>"0", "role_ids"=>["", "11"], "external_usergroups_attributes"=>{"0"=>{"_destroy"=>"false", "name"=>"kedargrp", "auth_source_id"=>"4", "id"=>"8"}, "1"=>{"_destroy"=>"false", "name"=>"foobargroup", "auth_source_id"=>"3", "id"=>"7"}, "new_external_usergroups"=>{"_destroy"=>"false", "name"=>"", "auth_source_id"=>"3"}, "new_1424767137133"=>{"_destroy"=>"false", "name"=>"foobargroup", "auth_source_id"=>"3"}}}, "id"=>"3-foreman"}
Failed to save: Name has already been taken



Version-Release number of selected component (if applicable):
sat6.1 Beta snap3

How reproducible:


Steps to Reproduce:
1. create usergroup 
2. add an invalid external AD UserGroup.
3.

Actual results:
No error message seen on the UI.

foreman/production.log shows 

a) "Failed to save: Name is not found in the authentication source"
b) Failed to save: Name has already been taken

Expected results:
Shouls display the actual error on the UI, 
a) "Name is not found in the authentication source"
b) Name has already been taken

Additional info:
Comment 2 Marek Hulan 2015-03-01 09:24:10 EST
Created redmine issue http://projects.theforeman.org/issues/9592 from this bug
Comment 3 Marek Hulan 2015-03-01 09:38:34 EST
The expected behaviour here is the following:
if you're adding new external user group it's validated (e.g. it's name is not taken, it's reachable in external auth source)
if you're saving user group which has some existing external user groups, they are not validated, as this could prevent you from saving user group changes just because external service is temporary down
if you're saving user group and add new external user group, then it's also supposed to run all validations on this new external user group

It already adds error messages and it also marks the field red, but the issue was that the list of external user groups fields was folded, so the fix is to unfold the form in case there are any errors.
Comment 4 Bryan Kearney 2015-03-01 14:05:15 EST
Moving to POST since upstream bug http://projects.theforeman.org/issues/9592 has been closed
-------------
Marek Hulán
Applied in changeset commit:8e170d2186edc805e440e587438a4cf8207facd9.
Comment 7 Kedar Bidarkar 2015-03-09 07:53:26 EDT
now we get the below error message from the UI

a) has already been taken
b) is not found in the authentication source

VERIFIED with sat6.1 beta snap5
Comment 8 Bryan Kearney 2015-08-11 09:19:33 EDT
This bug is slated to be released with Satellite 6.1.
Comment 9 errata-xmlrpc 2015-08-12 01:27:14 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2015:1592

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