Open piotrzarzycki21 opened 6 months ago
@JoelProminic I was thinking to have that comparision during configuration fetching, where we are retrieving nomad_helper_url. Where do you think it should actually happen if not in that moment ?
I'm moving this for the next release. I have started implementing this. Should be ready soon, but let's not hold this since our first target is internal use.
I think that running this just after calling ConfigRead make sense. You can then load the nomad_helper_url
and resources/nomad_helper.html
pages into memory and compare them.
I have implemented initial version, but it doesn't work yet as I wanted to so, it's still require a bit more time. I have pushed my changes to branch. I will notify about significant progress and when it will be ready for tests.
@JoelProminic I think I have whole comparision of nomadhelper.html ready. I'm using HTTPRequest to load local and remote files. I'm using native JS module called "crypto" to compute hashes for both files.
Not we should discuss what kind of message we should display to the user.
Here is a message based on the existing Nomad check
Nomad Helper does not match the current version of Super.Human.Portal. To fix this:
- Copy
%data_directory%/domino/html/Super.Human.Portal/js-release/resources/nomadhelper.html
[Copy to Cllpboard] to/opt/hcl/domino/notes/latest/linux/nomad-files
[Copy to Cllpboard] on your Nomad server
This should be displayed once per day per user.
We also want to compare the page for nomad_helper_url to the expected nomadhelper.html and show a similar warning if they don't match exactly. Genesis doesn't have access to install nomad_helper.html, so we want to have SuperHumanPortal verify that the nomad_helper.html installed by the administrator matches the copy under
resources/
.If we are reading nomad_helper_url, then we need to safely handle the case where the URL doesn't resolve properly (because it was not properly configured). I would expect the administrator to test this, but until it is fixed, Super.Human.Portal should use the default logic instead.
A mismatching nomad_helper.html is not necessarily a blocker, so I think we should attempt to use the helper anyway in this case. If this fails, it should be handled by the callback logic.
Originally posted by @JoelProminic in https://github.com/Moonshine-IDE/Super.Human.Portal/issues/54#issuecomment-2088775767