Skip to content

Commit

Permalink
Is public basic (#568)
Browse files Browse the repository at this point in the history
* use env vars

* demo_user

* use env

* use env
  • Loading branch information
cziaarm authored Oct 31, 2024
1 parent 99d3742 commit 888c6d7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def authenticate_if_needed
return true if Rails.env.test?
if (is_hidden || is_staging) && !is_api_or_pdf
authenticate_or_request_with_http_basic do |username, password|
username == "samvera" && password == "hyku"
username == ENV.fetch("HYKU_DEMO_USER") && password == ENV.fetch("HYKU_DEMO_PASSWORD")
end
end
end
Expand Down
4 changes: 4 additions & 0 deletions ops/production-deploy.tmpl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ extraEnvVars: &envVars
value: iro.bl.uk
- name: HYKU_SMTP_SETTINGS
value: '{"from":"[email protected]","user_name":"apikey","password":"$SMTP_PASSWORD","address":"smtp.sendgrid.net","domain":"bl.uk","port":"587","authentication":"plain","enable_starttls_auto":true}'
- name: HYKU_DEMO_USER
value: "bl_hyku_demo_user"
- name: HYKU_DEMO_PASSWORD
value: $HYKU_DEMO_PASSWORD
- name: SMTP_ADDRESS
value: smtp.sendgrid.net
- name: SMTP_DOMAIN
Expand Down
4 changes: 4 additions & 0 deletions ops/staging-deploy.tmpl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ extraEnvVars: &envVars
value: "true"
- name: HYKU_ROOT_HOST
value: bl-staging.notch8.cloud
- name: HYKU_DEMO_USER
value: "bl_hyku_demo_user"
- name: HYKU_DEMO_PASSWORD
value: $HYKU_DEMO_PASSWORD
- name: S3_DOWNLOADS
value: "true"
- name: SMTP_ADDRESS
Expand Down

0 comments on commit 888c6d7

Please sign in to comment.