mirror of
https://github.com/ansible/awx.git
synced 2026-01-17 04:31:21 -03:30
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 <CONS_JPE@jysk.com>
This commit is contained in:
parent
2aa32f61f8
commit
e23ee41082
@ -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);
|
||||
|
||||
}
|
||||
]);
|
||||
]);
|
||||
Loading…
x
Reference in New Issue
Block a user