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:
parent
ba49fea89a
commit
b611dfdf37
4 changed files with 29 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue