From b445201de17c8a0c4158a4d089efa26478b4c44d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=A1clav=20Barto=C5=A1?= <bartos@cesnet.cz>
Date: Mon, 18 Jan 2021 14:21:09 +0100
Subject: [PATCH] Improved message about the owner/assignee field

---
 thehive_button/public/env.js            | 2 +-
 thehive_button/public/main.js           | 1 +
 thehive_button/public/options_editor.js | 3 +--
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/thehive_button/public/env.js b/thehive_button/public/env.js
index 4321b85..d6c01ed 100644
--- a/thehive_button/public/env.js
+++ b/thehive_button/public/env.js
@@ -1,4 +1,4 @@
 // Default plugin configuration
 export const THEHIVE_URL = 'https://hive.gn4-3-wp8-soc.sunet.se/';
 export const THEHIVE_API_KEY = '5LymseWiurZBrQN8Kqp8O+9KniTL5cE0';
-export const THEHIVE_OWNER = 'admin'; // default owner account of the created cases
+export const THEHIVE_OWNER = ''; // user to assign created cases to
diff --git a/thehive_button/public/main.js b/thehive_button/public/main.js
index ee46d73..0bc8b00 100644
--- a/thehive_button/public/main.js
+++ b/thehive_button/public/main.js
@@ -26,6 +26,7 @@ function TheHiveButtonVisProvider(Private) {
         // add default parameters
         url: THEHIVE_URL,
         apikey: THEHIVE_API_KEY,
+        // NOTE: setting owner currently doesn't work. This is a bug in TheHive, see https://github.com/TheHive-Project/TheHive/issues/1473
         owner: THEHIVE_OWNER,
         obsFields: [], // list of objects, e.g. {name: "clientip", type: "ip", cnt: 100}
       }
diff --git a/thehive_button/public/options_editor.js b/thehive_button/public/options_editor.js
index 38762bd..8985884 100644
--- a/thehive_button/public/options_editor.js
+++ b/thehive_button/public/options_editor.js
@@ -116,11 +116,10 @@ export function optionsEditor(props) {
         </EuiFormRow>
       </EuiFlexItem>
       <EuiFlexItem grow={1}>
-        <EuiFormRow label="Assignee" helpText="User to assign created cases to. Must be a valid username from The Hive instance.">
+        <EuiFormRow label="Assignee" helpText="Assign created cases to this user instead of the owner of the API key (optional, if set, it must be a valid username from The Hive instance). **Note: This currently doesn't work due to a bug in The Hive.**">
           <EuiFieldText
             value={stateParams.owner}
             onChange={e => setValue('owner', e.target.value)}
-            isInvalid={stateParams.owner == ""}
           />
         </EuiFormRow>
       </EuiFlexItem>
-- 
GitLab