From e23ee410821fb0f14e328250065fc16d201d9c14 Mon Sep 17 00:00:00 2001 From: Jakob Pedersen Date: Tue, 9 Jul 2019 10:47:19 +0200 Subject: [PATCH] Fix issue #3857 with a more informative error message when the usercan not post to /#/templates/add_job_template The cause can be both missing permissions and no projects being available. Related #3857 Signed-off-by: Jakob Pedersen --- awx/ui/client/src/templates/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/awx/ui/client/src/templates/main.js b/awx/ui/client/src/templates/main.js index d118e1fc33..70d8b24b00 100644 --- a/awx/ui/client/src/templates/main.js +++ b/awx/ui/client/src/templates/main.js @@ -124,7 +124,7 @@ angular.module('templates', [surveyMaker.name, jobTemplates.name, labels.name, p .then(function(data) { if (!data.actions.POST) { $state.go("^"); - Alert(i18n._('Permission Error'), i18n._('You do not have permission to add a job template.'), 'alert-info'); + Alert(i18n._('Permission Error'), i18n._('You do not have permission to add a job template, or there are no projects available.'), 'alert-info'); } }).catch(function(response){ ProcessErrors(null, response.data, response.status, null, { @@ -850,4 +850,4 @@ angular.module('templates', [surveyMaker.name, jobTemplates.name, labels.name, p $stateProvider.state(stateTree); } - ]); + ]); \ No newline at end of file