mirror of
https://github.com/ansible/awx.git
synced 2026-05-08 01:47:35 -02:30
preserve default notification messages for users with read-only access
This commit is contained in:
@@ -41,19 +41,7 @@ export default ['Rest', 'Wait',
|
|||||||
Rest.setUrl(GetBasePath('notification_templates'));
|
Rest.setUrl(GetBasePath('notification_templates'));
|
||||||
Rest.options()
|
Rest.options()
|
||||||
.then(({data}) => {
|
.then(({data}) => {
|
||||||
if (data.actions.POST) {
|
defaultMessages = data.actions.GET.messages.default;
|
||||||
defaultMessages = data.actions.POST.messages.default;
|
|
||||||
} else {
|
|
||||||
const defaults = {
|
|
||||||
message: '<DEFAULT_MESSAGE>',
|
|
||||||
body: '<DEFAULT_BODY>',
|
|
||||||
};
|
|
||||||
defaultMessages = {
|
|
||||||
started: defaults,
|
|
||||||
success: defaults,
|
|
||||||
error: defaults,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
GetChoices({
|
GetChoices({
|
||||||
|
|||||||
Reference in New Issue
Block a user