Skip to content

Commit ffa22d0

Browse files
committed
Removed is_real_production?, moved the check to the OSU initializer
1 parent bdd6657 commit ffa22d0

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

config/initializers/is_real_production.rb

Lines changed: 0 additions & 3 deletions
This file was deleted.

config/initializers/openstax_utilities.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@
99
next
1010
end
1111

12-
next if !is_real_production? || current_user.is_administrator?
13-
14-
raise SecurityTransgression
12+
raise SecurityTransgression if Rails.application.secrets.environment_name == 'production' &&
13+
!current_user.is_administrator?
1514
end
1615
secrets = Rails.application.secrets
1716
config.environment_name = secrets.environment_name

0 commit comments

Comments
 (0)