Tip: Add the allowed directories as shortcuts in the file explorer

If you’re me, then you set a whitelist of directories to be accessible by OOD.


  OOD_ALLOWLIST_PATH: "/work:/home:/project:/scratch:/modules:/nas:/datasets"

But then, you realized that users can no longer navigate to root. Now each of these directories need to be added as shortcuts, to prevent frustration.



you can make this robust. There is no need to hard code the list in two places, because the whitelist environment variable is exposed to the dashboard app ruby initializers.

OodFilesApp.candidate_favorite_paths.tap do |paths|
    allowlist = ENV["OOD_ALLOWLIST_PATH"].split(":")
    paths.concat allowlist.map { |p| FavoritePath.new("#{p}")  }

This makes perfect sense. All the directories that they have access to, they have easy access to. And if the list needs to be updated, it only needs to be updated in one place.