Fix #2785: Allow changing API key; require password to view or change key.

This commit is contained in:
evazion
2016-12-17 22:32:01 -06:00
parent 3e285ea4ce
commit a92120e873
12 changed files with 201 additions and 78 deletions

View File

@@ -0,0 +1,15 @@
<div id="c-maintenance-user-api-keys">
<div id="a-show">
<h1>API Key</h1>
<p>You must re-enter your password to view or change your API key.</p>
<%= simple_form_for CurrentUser.user, url: view_user_api_key_path(CurrentUser.user), method: :post do |f| %>
<%= f.input :password, :as => :password, :input_html => {:autocomplete => "off"} %>
<%= f.button :submit, "Submit" %>
<% end %>
</div>
</div>
<% content_for(:page_title) do %>
API Key - <%= Danbooru.config.app_name %>
<% end %>