Fix #4177: Allow all users to change their username.
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
class UserNameChangeRequestsController < ApplicationController
|
class UserNameChangeRequestsController < ApplicationController
|
||||||
before_action :member_only, :only => [:index, :show]
|
before_action :member_only, :only => [:index, :show, :new, :create]
|
||||||
before_action :gold_only, :only => [:new, :create]
|
|
||||||
respond_to :html, :json, :xml
|
respond_to :html, :json, :xml
|
||||||
|
|
||||||
def new
|
def new
|
||||||
|
|||||||
@@ -86,12 +86,6 @@
|
|||||||
<td>Yes</td>
|
<td>Yes</td>
|
||||||
<td>Yes</td>
|
<td>Yes</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td>Name Changes</td>
|
|
||||||
<td>No</td>
|
|
||||||
<td>Yes</td>
|
|
||||||
<td>Yes</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -11,12 +11,7 @@
|
|||||||
<fieldset id="basic-settings-section">
|
<fieldset id="basic-settings-section">
|
||||||
<div class="input">
|
<div class="input">
|
||||||
<label>Name</label>
|
<label>Name</label>
|
||||||
|
<p><%= link_to "Change your name", new_user_name_change_request_path %></p>
|
||||||
<% if CurrentUser.user.is_gold? %>
|
|
||||||
<p><%= link_to "Change your name", new_user_name_change_request_path %></p>
|
|
||||||
<% else %>
|
|
||||||
<p>You must <%= link_to "upgrade your account", new_user_upgrade_path %> to request a name change</p>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="input">
|
<div class="input">
|
||||||
|
|||||||
@@ -7,12 +7,6 @@
|
|||||||
comments. If you want <%= link_to "more features", new_user_upgrade_path %> you can upgrade your account later.
|
comments. If you want <%= link_to "more features", new_user_upgrade_path %> you can upgrade your account later.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
|
||||||
<strong>This site is open to web crawlers, so whatever name you choose will be public</strong>. This includes
|
|
||||||
favorites, uploads, and comments. Almost everything is public. So don't choose a name you don't want to be
|
|
||||||
associated with.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<div id="p3">
|
<div id="p3">
|
||||||
<%= simple_form_for(@user, html: {id: "signup-form"}) do |f| %>
|
<%= simple_form_for(@user, html: {id: "signup-form"}) do |f| %>
|
||||||
<%= f.input :name, as: :string %>
|
<%= f.input :name, as: :string %>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ require 'test_helper'
|
|||||||
class UserNameChangeRequestsControllerTest < ActionDispatch::IntegrationTest
|
class UserNameChangeRequestsControllerTest < ActionDispatch::IntegrationTest
|
||||||
context "The user name change requests controller" do
|
context "The user name change requests controller" do
|
||||||
setup do
|
setup do
|
||||||
@user = create(:gold_user)
|
@user = create(:member_user)
|
||||||
@admin = create(:admin_user)
|
@admin = create(:admin_user)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user