File tree Expand file tree Collapse file tree 4 files changed +16
-7
lines changed Expand file tree Collapse file tree 4 files changed +16
-7
lines changed Original file line number Diff line number Diff line change 99 target: '_blank', rel: 'noopener noreferrer'
1010 = link_to 'Open Source', 'https://github.com/galahq/gala',
1111 target: '_blank', rel: 'noopener noreferrer'
12- %a { href: "https://github.com/galahq/gala/releases/tag/#{ENV['RELEASE']}" }
13- = ENV['RELEASE']
12+ - if ENV['RELEASE'].present?
13+ %a .footer__release { href: "https://github.com/galahq/gala/releases/tag/#{ENV['RELEASE']}" }
14+ = ENV['RELEASE']
Original file line number Diff line number Diff line change 3333 autocomplete: "new-password"
3434
3535 = f.submit t('.sign_up'), class: %w[pt-intent-primary]
36-
37- %a .pt-button.pt-icon-log-in.oauth-icon-google {role: 'button',
38- href: omniauth_authorize_path('authentication_strategy', 'google')}
39- = t('devise.shared.links.sign_in_with_provider', provider: 'Google')
36+ - if ENV['TEMPORARY_UNCONFIRMED_ACCESS'] == 'false'
37+ %a .pt-button.pt-icon-log-in.oauth-icon-google {role: 'button',
38+ href: omniauth_authorize_path('authentication_strategy', 'google')}
39+ = t('devise.shared.links.sign_in_with_provider', provider: 'Google')
4040
4141 = render " devise/shared/links"
Original file line number Diff line number Diff line change @@ -26,7 +26,14 @@ class Application < Rails::Application
2626 config . middleware . use Rack ::Deflater
2727 end
2828
29+ # Set release version
2930 ENV [ 'RELEASE' ] = 'v2.2.0' # TODO: experiment doing github releases again
3031
32+ # Determine if we're in staging environment
33+ ENV [ 'STAGING' ] = ( ENV [ 'BASE_URL' ] &.include? ( 'staging' ) ) . to_s
34+
35+ # Allow temporary unconfirmed access in staging development
36+ ENV [ 'TEMPORARY_UNCONFIRMED_ACCESS' ] ||=
37+ ( ENV [ 'STAGING' ] == 'true' && Rails . env . development? ) . to_s
3138 end
3239end
Original file line number Diff line number Diff line change 115115 # able to access the website for two days without confirming their account,
116116 # access will be blocked just in the third day. Default is 0.days, meaning
117117 # the user cannot access the website without confirming their account.
118- # config.allow_unconfirmed_access_for = 2.days
118+ unconfirmed = ENV [ 'TEMPORARY_UNCONFIRMED_ACCESS' ] == 'true'
119+ config . allow_unconfirmed_access_for = unconfirmed ? 7 . days : 0 . days
119120
120121 # A period that the user is allowed to confirm their account before their
121122 # token becomes invalid. For example, if set to 3.days, the user can confirm
You can’t perform that action at this time.
0 commit comments