Files
clinch/app/controllers/dashboard_controller.rb
Dan Milne bf104a9983
Some checks failed
CI / scan_ruby (push) Has been cancelled
CI / scan_js (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / test (push) Has been cancelled
CI / system-test (push) Has been cancelled
Fix CSP errors - migrate inline JS to stimulus controllers. Add a URL for applications so users can discover them
2025-11-04 17:06:53 +11:00

18 lines
387 B
Ruby

class DashboardController < ApplicationController
def index
# First run: redirect to signup
if User.count.zero?
redirect_to signup_path
return
end
# User must be authenticated
@user = Current.session.user
# Load user's accessible applications
@applications = Application.active.select do |app|
app.user_allowed?(@user)
end
end
end