diff options
Diffstat (limited to 'src/actions/mixins/auth/allow_guests.cr')
-rw-r--r-- | src/actions/mixins/auth/allow_guests.cr | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/actions/mixins/auth/allow_guests.cr b/src/actions/mixins/auth/allow_guests.cr new file mode 100644 index 0000000..3961399 --- /dev/null +++ b/src/actions/mixins/auth/allow_guests.cr @@ -0,0 +1,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 |