From 063ef433b98ef4cfe503512b7bd0c8ee76f30e81 Mon Sep 17 00:00:00 2001 From: Jeff Ohrstrom Date: Thu, 21 Nov 2024 10:04:16 -0500 Subject: [PATCH] ensure CurrentUser is available in ondemand.d files (#3967) Ensure CurrentUser is available in ondemand.d files by requiring the appropriate libraries. --- apps/dashboard/config/configuration_singleton.rb | 1 + apps/dashboard/lib/current_user.rb | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/apps/dashboard/config/configuration_singleton.rb b/apps/dashboard/config/configuration_singleton.rb index d2788d95bb..8957072a86 100644 --- a/apps/dashboard/config/configuration_singleton.rb +++ b/apps/dashboard/config/configuration_singleton.rb @@ -1,5 +1,6 @@ require 'pathname' require 'dotenv' +require_relative '../lib/current_user' # Dashboard app specific configuration singleton definition # following the first proposal in: diff --git a/apps/dashboard/lib/current_user.rb b/apps/dashboard/lib/current_user.rb index 3455e4040a..47e16a4b82 100644 --- a/apps/dashboard/lib/current_user.rb +++ b/apps/dashboard/lib/current_user.rb @@ -1,5 +1,9 @@ # frozen_string_literal: true +require 'etc' +require 'singleton' +require 'active_support/core_ext/module/delegation' + # The CurrentUser class represents the current user on the system from Etc. # It has a name, a home directory, gid, uid and so on. #