gitlab-org--gitlab-foss/lib/gitlab/backend/shell_env.rb

19 lines
355 B
Ruby

module Gitlab
# This module provide 2 methods
# to set specific ENV variables for GitLab Shell
module ShellEnv
extend self
def set_env(user)
# Set GL_ID env variable
if user
ENV['GL_ID'] = "user-#{user.id}"
end
end
def reset_env
# Reset GL_ID env variable
ENV['GL_ID'] = nil
end
end
end