Reason shows None in error dialog in horizon
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
StarlingX |
Fix Released
|
Low
|
Takamasa Takenaka |
Bug Description
Brief Description
-----------------
When reader user tries to modify system inventry configuration,
it shows
-------
Error: Unable to modify host "controller-0". None
-------
It should show reason/action after error message but not "None"
(Error message itself is correct as reader user
does not have a permission to modify configuration)
Severity
--------
<Minor: System/Feature is usable with minor issue>
Steps to Reproduce
------------------
Create reader role user and try to modify system configuration.
Expected Behavior
------------------
Reason/action should be shown in error dialog.
Actual Behavior
----------------
"None" is shown.
Reproducibility
---------------
100% reproducible
System Configuration
-------
Any
Branch/Pull Time/Commit
-------
master
N/A
Timestamp/Logs
--------------
N/A
Test Activity
-------------
Feature Testing
Workaround
----------
No work around
Changed in starlingx: | |
status: | New → In Progress |
Changed in starlingx: | |
assignee: | nobody → Takamasa Takenaka (ttakenak) |
Changed in starlingx: | |
importance: | Undecided → Low |
tags: | added: stx.9.0 stx.config |
Reviewed: https:/ /review. opendev. org/c/starlingx /config/ +/896300 /opendev. org/starlingx/ config/ commit/ 6fd1a4902cb8510 de0145bb1b5d173 ff10ebb18f
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 6fd1a4902cb8510 de0145bb1b5d173 ff10ebb18f
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 message" : "{"code": 403, "title": "Forbidden",
needs to look into "description" as the message in
HTTPForbidden is:
{"error_
"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: I4d0e2c2db5a122 40145aef432c7d8 ecf53a60204
Signed-off-by: Takamasa Takenaka <email address hidden>