aboutsummaryrefslogtreecommitdiff
path: root/src/actions/mixins/auth/allow_guests.cr
blob: 3961399b8385fcacae442dedef6dd0b8e3c7b949 (plain)
1
2
3
4
5
6
7
8
9
10
module Auth::AllowGuests
  macro included
    skip require_sign_in
  end

  # Since sign in is not required, current_user might be nil
  def current_user : User?
    current_user?
  end
end