1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-25 08:09:38 +02:00

Add back good job dashboard with auth (#1364)

This commit is contained in:
Zach Gollwitzer 2024-10-24 17:28:29 -04:00 committed by GitHub
parent ba49fea89a
commit b611dfdf37
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 29 additions and 0 deletions

View file

@ -10,4 +10,16 @@ Rails.application.configure do
}
}
end
# Auth for jobs admin dashboard
ActiveSupport.on_load(:good_job_application_controller) do
before_action do
raise ActionController::RoutingError.new("Not Found") unless current_user&.super_admin?
end
def current_user
session = Session.find_by(id: cookies.signed[:session_token])
session&.user
end
end
end