Bug 1551693

Summary: internal server error ActiveRecord::AssociationTypeMismatch when editing current_group
Product: Red Hat CloudForms Management Engine Reporter: Satoe Imaishi <simaishi>
Component: APIAssignee: Gregg Tanzillo <gtanzill>
Status: CLOSED ERRATA QA Contact: Martin Kourim <mkourim>
Severity: high Docs Contact:
Priority: high    
Version: 5.9.0CC: cpelland, gtanzill, obarenbo
Target Milestone: GAKeywords: ZStream
Target Release: 5.8.4   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: api:rest
Fixed In Version: 5.8.4.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1549086 Environment:
Last Closed: 2018-06-25 14:17:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: CFME Core Target Upstream Version:
Embargoed:
Bug Depends On: 1549086    
Bug Blocks:    

Comment 2 CFME Bot 2018-03-05 18:31:11 UTC
New commit detected on ManageIQ/manageiq/fine:
https://github.com/ManageIQ/manageiq/commit/8460d9b01422a1cbed0b933a1f1da76fbfb9731c

commit 8460d9b01422a1cbed0b933a1f1da76fbfb9731c
Author:     Alberto Bellotti <abellotti.github.com>
AuthorDate: Tue Feb 27 09:29:01 2018 -0500
Commit:     Satoe Imaishi <simaishi>
CommitDate: Mon Mar 5 13:19:45 2018 -0500

    Merge pull request #329 from jntullo/bz_1549086
    
    Raise bad request when current_group is specified on edit
    (cherry picked from commit 40cf625ebcbf56b9df316196463bbc6c011aaf92)
    
    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1551693

 app/controllers/api/users_controller.rb |  4 ++--
 spec/requests/api/users_spec.rb         | 21 +++++++++++++++++++++
 2 files changed, 23 insertions(+), 2 deletions(-)

Comment 4 Martin Kourim 2018-04-25 12:12:13 UTC
Verified that bad request is raised on 5.8.4.1 when current_group is specified on edit:
{
    "error": {
        "kind": "bad_request",
        "message": "Invalid attribute(s) current_group specified for a user",
        "klass": "Api::BadRequestError"
    }
}

Comment 6 errata-xmlrpc 2018-06-25 14:17:44 UTC
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-2018:1972