Skip to content

Commit

Permalink
Merge pull request #2252 from openstax/more_status
Browse files Browse the repository at this point in the history
Protect the status page and add the tutor-deployment version
  • Loading branch information
Dantemss authored Jan 7, 2021
2 parents 55a4223 + ac1b96d commit f4dc79e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ gem 'rails-html-sanitizer', '~> 1.0'
gem 'addressable'

# Utilities for OpenStax websites
gem 'openstax_utilities', '~> 4.4.0'
gem 'openstax_utilities', '~> 4.4.1'

# Cron job scheduling
gem 'whenever'
Expand Down
6 changes: 3 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ GEM
awesome_print (1.8.0)
aws-eventstream (1.1.0)
aws-partitions (1.396.0)
aws-sdk-autoscaling (1.52.0)
aws-sdk-autoscaling (1.53.0)
aws-sdk-core (~> 3, >= 3.109.0)
aws-sigv4 (~> 1.1)
aws-sdk-cloudwatch (1.46.0)
Expand Down Expand Up @@ -471,7 +471,7 @@ GEM
openstax_active_force
rails (~> 5.0)
restforce
openstax_utilities (4.4.0)
openstax_utilities (4.4.1)
aws-sdk-autoscaling
faraday
faraday-http-cache
Expand Down Expand Up @@ -825,7 +825,7 @@ DEPENDENCIES
openstax_healthcheck
openstax_rescue_from
openstax_salesforce
openstax_utilities (~> 4.4.0)
openstax_utilities (~> 4.4.1)
p3p
parallel_tests
paranoia (~> 2.4.1)
Expand Down
3 changes: 3 additions & 0 deletions config/initializers/openstax_utilities.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
OpenStax::Utilities.configure do |config|
config.status_authenticate = -> { raise SecurityTransgression unless current_user.is_admin? }
end
1 change: 1 addition & 0 deletions config/secrets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ production:
environment_name: <%= ENV['ENVIRONMENT_NAME'] %>
exception_contact_name: <%= ENV['EXCEPTION_CONTACT_NAME'] %>
release_version: <%= ENV['RELEASE_VERSION'] %>
deployment_version: <%= ENV['DEPLOYMENT_VERSION'] %>
sentry_dsn: <%= ENV['SENTRY_DSN'] %>
response_validation:
url: <%= ENV['RESPONSE_VALIDATION_URL'] %>
Expand Down

0 comments on commit f4dc79e

Please sign in to comment.