Comment 1 for bug 2037320

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to config (master)

Reviewed: https://review.opendev.org/c/starlingx/config/+/896300
Committed: https://opendev.org/starlingx/config/commit/6fd1a4902cb8510de0145bb1b5d173ff10ebb18f
Submitter: "Zuul (22348)"
Branch: master

commit 6fd1a4902cb8510de0145bb1b5d173ff10ebb18f
Author: Takamasa Takenaka <email address hidden>
Date: Fri Sep 22 17:56:26 2023 -0300

    Add reason messsage for HTTPForbidden

    Currently there is no message for HTTPForbidden.
    When user operate from horizon, access control is
    properly working but there is no message for the
    reason in error dialog.

    For example:
    Error: Unable to modify host "controller-1". None
    (Reason/Action message is expected but it shows "None")

    When a message in HTTPForbidden is extracted, cgts-client
    needs to look into "description" as the message in
    HTTPForbidden is:
    {"error_message": "{"code": 403, "title": "Forbidden",
    "description": "error message"}"}

    Closes-bug: 2037320

    Test Plan:
    PASS: Fresh install successfully(SX/DC)
    PASS: Login with reader role, modify configuration
          for inventory and show the error dialog with
          reason: "Not allowed/Role admin is needed"
    PASS: Login with admin role, modify configuration
          for inventory and no error dialog related
          access control is shown

    Change-Id: I4d0e2c2db5a12240145aef432c7d8ecf53a60204
    Signed-off-by: Takamasa Takenaka <email address hidden>