Skip to content

Commit 42b9d5f

Browse files
committed
fix: return to the sign in page if trying to access the editor unauthenticated
1 parent fb46b28 commit 42b9d5f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

app/controllers/concerns/authentication_concern.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ module AuthenticationConcern
33

44
included do
55
helper_method :current_user
6+
7+
rescue_from Maglev::Errors::NotAuthorized do |exception|
8+
redirect_to main_app.new_session_path
9+
end
10+
611
end
712

813
private

0 commit comments

Comments
 (0)