From 1a2458331c7427db5e1164de4739311baed0ba02 Mon Sep 17 00:00:00 2001 From: Steffen Waterkamp Date: Wed, 15 Sep 2021 17:00:47 +0200 Subject: [PATCH 1/3] Change condition for enabling CreateTicketIcon and add helpful tooltip --- gsa/src/web/pages/results/detailspage.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/gsa/src/web/pages/results/detailspage.js b/gsa/src/web/pages/results/detailspage.js index 984b0f8af6..949ac802ec 100644 --- a/gsa/src/web/pages/results/detailspage.js +++ b/gsa/src/web/pages/results/detailspage.js @@ -100,6 +100,15 @@ export const ToolBarIcons = ({ }) => { const capabilities = useCapabilities(); + const isMissingPermissions = + !capabilities.mayCreate('permission') || !capabilities.mayAccess('users'); + const createTicketIconTitle = isMissingPermissions + ? _( + 'Permissions to create a ticket are insufficient. You need the ' + + 'create_permission and get_users permissions.', + ) + : _('Create new Ticket'); + return ( @@ -132,7 +141,8 @@ export const ToolBarIcons = ({ )} {capabilities.mayCreate('ticket') && ( From d6e89bfb77d52fc48805aa44cd0c1de5c3bdbc80 Mon Sep 17 00:00:00 2001 From: Steffen Waterkamp Date: Wed, 15 Sep 2021 17:01:02 +0200 Subject: [PATCH 2/3] Translate new tooltip to German --- gsa/public/locales/gsa-de.json | 1 + 1 file changed, 1 insertion(+) diff --git a/gsa/public/locales/gsa-de.json b/gsa/public/locales/gsa-de.json index 598ece302f..48f5d2b586 100644 --- a/gsa/public/locales/gsa-de.json +++ b/gsa/public/locales/gsa-de.json @@ -1196,6 +1196,7 @@ "Permissions": "Berechtigungen", "Permissions ({{count}})": "Berechtigungen ({{count}})", "Permissions Filter": "Berechtigungen-Filter", + "Permissions to create a ticket are insufficient. You need the create_permission and get_users permissions.": "Die Berechtigungen ein Ticket zu erstellen sind unzureichend. Sie benötigen die create_permission- und get_users-Berechtigungen.", "Physical": "Physisch", "Platform": "Plattform", "Please be aware that:": "Bitte beachten Sie, dass:", From d292ef4a5a66831c6e58fe7b4528efce2f3655c1 Mon Sep 17 00:00:00 2001 From: Steffen Waterkamp Date: Wed, 15 Sep 2021 17:02:45 +0200 Subject: [PATCH 3/3] Update Changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f840fbbcd..147c91f781 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Added ### Changed +- Changed conditions for enabling CreateTicketIcon on results detailspage [#3154](https://github.com/greenbone/gsa/pull/3154) ### Deprecated