Actions
action #132941
openMinion hook script can't delete job comments
Start date:
2023-07-18
Due date:
% Done:
0%
Estimated time:
Description
Observation¶
For handling investigation jobs, the hook script sometimes has to delete its own comments. However, that's currently not possible:
Jul 18 00:59:03 openqa openqa-gru[12355]: openqa-cli (158 /opt/os-autoinst-scripts/openqa-investigate): (openqa-cli api [...] --host https://openqa.suse.de -X DELETE jobs/11599748/comments/898694) stderr: >>>403 Forbidden<<<
Jul 18 00:59:03 openqa openqa-gru[12355]: openqa-cli (158 /opt/os-autoinst-scripts/openqa-investigate): (openqa-cli api [...] --host https://openqa.suse.de -X DELETE jobs/11599748/comments/898694) rc: 1 >>>{"error":"Administrator level required","error_status":403}<<<
That's because geekotest is only an operator and not an admin (on both o3 and osd).
As a normal user, you can edit your own comments, but you cannot delete, not over the webui and not via API.
I don't know if the geekotest user was edited recently. I can't remember seeing this error before. The feature that is using this has been added quite a while ago.
Suggestions¶
- Should we allow normal users (or alternatively operators) to delete their own comments? Then it should IMHO be its own route (e.g.
DELETE /my/comments/<id>
) to transparently separate the permissions from the general comment deletion route which is only available to admins - Should we make geekotest an administrator?
Updated by osukup over 1 year ago
simplest way .. geekotest administrator.
Who has access to geekotest SECRET and API_KEY ? I except everyone who has access to O3 and OSD ?
Actions