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

**URL:** <https://discourse.openondemand.org/t/tip-add-the-allowed-directories-as-shortcuts-in-the-file-explorer/2448>\
**Category:** General Discussion\
**Created:** [January 24, 2023, 3:40am UTC](https://discourse.openondemand.org/t/tip-add-the-allowed-directories-as-shortcuts-in-the-file-explorer/2448 "2023-01-24T03:40:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![simonleary-umass-edu](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/simonleary-umass-edu/32/1254_2.png) [@simonleary-umass-edu](https://discourse.openondemand.org/u/simonleary-umass-edu)\
**Post date:** [January 24, 2023, 3:40am UTC](https://discourse.openondemand.org/t/tip-add-the-allowed-directories-as-shortcuts-in-the-file-explorer/2448/1 "2023-01-24T03:40:22Z")

</div>

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

[https://osc.github.io/ood-documentation/latest/customization.html#block-or-allow-directory-access](https://osc.github.io/ood-documentation/latest/customization.html#block-or-allow-directory-access)

```yaml
pun_custom_env:
  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.

[https://osc.github.io/ood-documentation/latest/customization.html#add-shortcuts-to-files-menu](https://osc.github.io/ood-documentation/latest/customization.html#add-shortcuts-to-files-menu)

# But,

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.

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

```

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.

---

<div class="post-metadata">

**Author:** ![simonleary-umass-edu](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/simonleary-umass-edu/32/1254_2.png) [@simonleary-umass-edu](https://discourse.openondemand.org/u/simonleary-umass-edu)\
**Post date:** [April 18, 2025, 3:35pm UTC](https://discourse.openondemand.org/t/tip-add-the-allowed-directories-as-shortcuts-in-the-file-explorer/2448/2 "2025-04-18T15:35:06Z")

</div>

after the 4.0 update, the link to docs is now [here](https://osc.github.io/ood-documentation/latest/customizations.html#add-shortcuts-to-files-menu) and the code now looks like this:

```auto
Rails.application.config.after_initialize do
    OodFilesApp.candidate_favorite_paths.tap do |paths|
    allowlist = ENV["OOD_ALLOWLIST_PATH"].split(":")
    paths.concat allowlist.map { |p| FavoritePath.new("#{p}") }
    end
end

```

---

<div class="post-metadata">

**Author:** ![jeff.ohrstrom](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jeff.ohrstrom/32/136_2.png) [@jeff.ohrstrom](https://discourse.openondemand.org/u/jeff.ohrstrom)\
**Post date:** [April 18, 2025, 3:38pm UTC](https://discourse.openondemand.org/t/tip-add-the-allowed-directories-as-shortcuts-in-the-file-explorer/2448/3 "2025-04-18T15:38:39Z")

</div>

Thanks, yea I noticed this issue too with the path selector. I’m wondering if we should have a special case for the root directory?
