OSC / ood-fileexplorer

[MOVED] The Open OnDemand File Explorer
https://osc.github.io/Open-OnDemand/
MIT License
4 stars 1 forks source link

Open terminal button still appears even when OOD_SHELL is set to an empty string #191

Closed wattry closed 5 years ago

wattry commented 5 years ago

We want to limit SSH access to our application installation server from the files application as we have multiple clusters running in 1:many setup. This makes the "Launch Terminal" button ambiguous.

In the docs it says that if you set OOD_SHELL to an empty string ( "" or '' ) then the button will be hidden. However, in the app.js cloudcmd render object "shell: process.env.OOD_SHELL || '/pun/sys/shell/ssh/default'," which will default the shell value to '/pun/sys/shell/ssh/default' regardless as an empty string results in a falsey, in Javascript.

ericfranz commented 5 years ago

Oops. That would be an example of a pitfall of adding a feature to two different apps in different languages. In Ruby, "" is truthy. In JavaScript, "" is falsy. Thank you for reporting, will fix.

wattry commented 5 years ago

Oops. That would be an example of a pitfall of adding a feature to two different apps in different languages. In Ruby, "" is truthy. In JavaScript, "" is falsy. Thank you for reporting, will fix.

We're a node shop so we're having the same pains with the Ruby code. I'll do a pull request if I find something next time.

MorganRodgers commented 5 years ago

A fix has been merged, but not yet deployed.