mirror of
https://github.com/discourse/discourse.git
synced 2026-09-05 04:40:41 -05:00
Redirect all controllers to login if required
We want to skip the filter for sessions controller so that we can login and we want to skip the filter for static pages because those should be visible to visitors.
This commit is contained in:
@@ -4,6 +4,7 @@ class SessionController < ApplicationController
|
||||
# page is going to be empty, this means that server will see an invalid CSRF and blow the session
|
||||
# once that happens you can't log in with social
|
||||
skip_before_filter :verify_authenticity_token, only: [:create]
|
||||
skip_before_filter :redirect_to_login_if_required
|
||||
|
||||
def create
|
||||
requires_parameter(:login, :password)
|
||||
|
||||
Reference in New Issue
Block a user