Skip to content

Commit 70ed1e7

Browse files
committed
Fix before_action naming clash causing space to be unset under certain circumstances
1 parent b82e26d commit 70ed1e7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

app/controllers/application_controller.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class ApplicationController < ActionController::Base
1919
# User auth should be required in the web interface as well; it's here rather than in routes so that it
2020
# doesn't override the token auth, above.
2121
before_action :authenticate_user!, except: [:index, :show, :embed, :calendar, :check_exists, :handle_error, :count, :redirect]
22-
before_action :set_space
22+
before_action :set_current_space
2323
before_action :set_current_user
2424

2525
# Should prevent forgery errors for JSON posts.
@@ -107,7 +107,7 @@ def user_not_authorized(exception)
107107
handle_error(:forbidden, t("#{policy_name}.#{exception.query}", scope: 'pundit', default: :default))
108108
end
109109

110-
def set_space
110+
def set_current_space
111111
Space.current_space = TeSS::Config.feature['spaces'] ? Space.find_by_host(request.host) : Space.default
112112
end
113113

0 commit comments

Comments
 (0)