Skip to content

Commit da1dba9

Browse files
authored
Merge pull request #2312 from openstax/redirect_status
Redirect to login if non-logged-in user tries to access status page
2 parents c195fe5 + 6b73f28 commit da1dba9

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
OpenStax::Utilities.configure do |config|
2-
config.status_authenticate = -> { raise SecurityTransgression unless current_user.is_admin? }
2+
config.status_authenticate = -> do
3+
authenticate_user!
4+
5+
next if performed? || current_user.is_admin?
6+
7+
raise SecurityTransgression
8+
end
39
end

0 commit comments

Comments
 (0)