Project

General

Profile

Actions

action #132941

open

Minion hook script can't delete job comments

Added by tinita over 1 year ago. Updated over 1 year ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Feature requests
Target version:
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?
Actions #1

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 #2

Updated by okurz over 1 year ago

  • Target version set to future
Actions

Also available in: Atom PDF