Launch NeoPass to all! <3 <3
This commit is contained in:
parent
7769016556
commit
410ace106e
3 changed files with 29 additions and 44 deletions
|
@ -69,19 +69,6 @@ module ApplicationHelper
|
|||
end
|
||||
end
|
||||
|
||||
# Add ?neopass=1 to the URL, or set the `neopass_access_secret=1` cookie, to
|
||||
# view NeoPass features. (NOTE: In production, this is a secret value
|
||||
# instead!)
|
||||
#
|
||||
# NOTE: We intentionally don't e.g. set the cookie just because you went to
|
||||
# the secret URL once, to avoid demo users getting confused about
|
||||
# whether NeoPass is publicly available: if they go to the public page,
|
||||
# they should NOT see NeoPass anymore, rather than think it's live!
|
||||
def can_use_neopass
|
||||
params[:neopass] == Rails.configuration.neopass_access_secret ||
|
||||
cookies[:neopass_access_secret] == Rails.configuration.neopass_access_secret
|
||||
end
|
||||
|
||||
def contact_email
|
||||
"matchu@openneo.net"
|
||||
end
|
||||
|
|
|
@ -98,7 +98,7 @@
|
|||
disabled: !@persisted_auth_user.uses_password? &&
|
||||
!@persisted_auth_user.email? %>
|
||||
<% end %>
|
||||
<% elsif can_use_neopass %>
|
||||
<% else %>
|
||||
<%= form_with url: auth_user_neopass_omniauth_authorize_path(intent: "connect"),
|
||||
method: :post, class: "settings-form", data: {turbo: false} do |form|
|
||||
%>
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
</div>
|
||||
</section>
|
||||
|
||||
<% if can_use_neopass %>
|
||||
<section class="login-option-neopass">
|
||||
<header>Have a NeoPass?</header>
|
||||
|
||||
|
@ -60,7 +59,6 @@
|
|||
</p>
|
||||
</details>
|
||||
</section>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% content_for :stylesheets do %>
|
||||
|
|
Loading…
Reference in a new issue