RFR: 2244: SecurityLevel in JiraHost is useless
Erik Joelsson
erikj at openjdk.org
Fri Apr 26 19:48:21 UTC 2024
On Fri, 26 Apr 2024 19:22:45 GMT, Zhao Song <zsong at openjdk.org> wrote:
> SecurityLevel in JiraHost is rarely used and sometimes it will conflict with the security configuration of issueNotifier. So there is no point to keep it. Also, I removed the support of `/issue create` command in this patch as ErikJ suggested.
>
> There is one useful usage of `securityLevel`, it's in `JiraIssue#addWebLink`, skara bot uses the security to determine if the link should be posted as a comment. But I think it can be replaced by checking the visibilityRole of the jiraHost.
issuetracker/src/main/java/org/openjdk/skara/issuetracker/jira/JiraIssue.java line 42:
> 40: private final RestRequest request;
> 41: private final JSONValue json;
> 42: private final boolean needSecurity;
I think we should keep this boolean and use `jiraProject.jiraHost().visibilityRole().isPresent()` to initialize it. Preventing editing of title and body is still relevant.
issuetracker/src/main/java/org/openjdk/skara/issuetracker/jira/JiraIssue.java line 90:
> 88: public void setTitle(String title) {
> 89: if (needSecurity) {
> 90: log.warning("Issue title does not support setting a security level - ignoring");
Keep this, but change log message to "...setting a visibility role...".
-------------
PR Review Comment: https://git.openjdk.org/skara/pull/1642#discussion_r1581466727
PR Review Comment: https://git.openjdk.org/skara/pull/1642#discussion_r1581467817
More information about the skara-dev
mailing list