Skip to content

Commit

Permalink
Add warning when nomad_helper_url doesn't exists
Browse files Browse the repository at this point in the history
- Warning displays only once, unless user clear the cookies (reference #54)
  • Loading branch information
piotrzarzycki21 committed May 8, 2024
1 parent fc7b8b3 commit a0ff71b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ package controller
}
else // otherwise, don't use nomadhelper.html. Open the Nomad link in a new tab. If Nomad is open already, the database will be opened in the original tab
{
var nomadWarningLink:Boolean = Boolean(window["Cookies"].get("SuperHumanPortalNomadHelperUrlLinkWarning"));
if (!loginProxy.isNomadHelperUrlExists() && nomadWarningLink == false)
{
window["Cookies"].set("SuperHumanPortalNomadHelperUrlLinkWarning", true);
Snackbar.show("This link is currently configured to open in a separate HCL Nomad Web window. For the best user experience, please ensure that your administrator has configured the server to open *.nsf database links in non separate HCL Nomad Web windows.",
0, "Close");
}

navigateToURL(new URLRequest(link));

data = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ package model.proxy.login
return _config;
}

public function isNomadHelperUrlExists():Boolean
{
return config.config.nomad_helper_url != "";
}

public function testAuthentication():void
{
if (proxyUrlParams.isPasswordReset) return;
Expand Down Expand Up @@ -160,6 +165,7 @@ package model.proxy.login
if (!config) return;

_config = config;

sendNotification(ProxyLogin.NOTE_LOGIN_SUCCESS, this.getData() as UserVO);
//ParseCentral.parseAppConfig(new XML(event.target["data"]));
}
Expand Down

0 comments on commit a0ff71b

Please sign in to comment.