Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix controllers that do not check log-in status before running #124

Merged
merged 2 commits into from
Nov 30, 2023

Conversation

tk0miya
Copy link
Contributor

@tk0miya tk0miya commented Nov 12, 2023

This adds before_action :require_logged_in call to the controllers that expects that user is logged in.

refs: #122

This adds `before_action :require_logged_in` call to the controllers
that expects that user is logged in.

refs: kaigionrails#122
@@ -1,4 +1,6 @@
class SampleWebpushNotificationsController < ApplicationController
before_action :require_logged_in
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if it's not good or not that blocking the #create request by redirecting. But it would be better than a crash to me.

@unasuke unasuke self-requested a review November 12, 2023 08:30
Copy link
Member

@unasuke unasuke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😎

Copy link
Collaborator

@okuramasafumi okuramasafumi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@okuramasafumi okuramasafumi merged commit ceb62c8 into kaigionrails:main Nov 30, 2023
@tk0miya tk0miya deleted the add_require_logged_in branch November 30, 2023 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants