From 2c3400fb4f5a22951d42f286975201bf817d7883 Mon Sep 17 00:00:00 2001 From: floppydiskette Date: Fri, 13 Sep 2024 12:58:12 +0100 Subject: wrong --- src/actions/mixins/auth/test_backdoor.cr | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/actions/mixins/auth/test_backdoor.cr (limited to 'src/actions/mixins/auth/test_backdoor.cr') diff --git a/src/actions/mixins/auth/test_backdoor.cr b/src/actions/mixins/auth/test_backdoor.cr new file mode 100644 index 0000000..68c9d91 --- /dev/null +++ b/src/actions/mixins/auth/test_backdoor.cr @@ -0,0 +1,13 @@ +module Auth::TestBackdoor + macro included + before test_backdoor + end + + private def test_backdoor + if LuckyEnv.test? && (user_id = params.get?(:backdoor_user_id)) + user = UserQuery.find(user_id) + sign_in user + end + continue + end +end -- cgit v1.2.3-54-g00ecf