Handle and display for invalid flow credentials when project is disabled #1689 (#1694)

* Handle and display for invalid flow credentials when project is disabled #1689

* fixed extra character

* fixed whitespace
This commit is contained in:
Ted
2018-04-15 03:51:26 -07:00
committed by Nick O'Leary
parent ae9cf13fc2
commit 29e0b194dd
3 changed files with 40 additions and 11 deletions

View File

@@ -179,13 +179,25 @@
]
}
} else if (msg.error === "credentials_load_failed") {
if (RED.user.hasPermission("projects.write")) {
if (RED.settings.theme("projects.enabled",false)) {
// projects enabled
if (RED.user.hasPermission("projects.write")) {
options.buttons = [
{
text: "Setup credentials",
click: function() {
persistentNotifications[notificationId].hideNotification();
RED.projects.showCredentialsPrompt();
}
}
]
}
} else {
options.buttons = [
{
text: "Setup credentials",
text: "Close",
click: function() {
persistentNotifications[notificationId].hideNotification();
RED.projects.showCredentialsPrompt();
}
}
]