Fix #4177: Allow all users to change their username.
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
class UserNameChangeRequestsController < ApplicationController
|
||||
before_action :member_only, :only => [:index, :show]
|
||||
before_action :gold_only, :only => [:new, :create]
|
||||
before_action :member_only, :only => [:index, :show, :new, :create]
|
||||
respond_to :html, :json, :xml
|
||||
|
||||
def new
|
||||
|
||||
@@ -86,12 +86,6 @@
|
||||
<td>Yes</td>
|
||||
<td>Yes</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Name Changes</td>
|
||||
<td>No</td>
|
||||
<td>Yes</td>
|
||||
<td>Yes</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -11,12 +11,7 @@
|
||||
<fieldset id="basic-settings-section">
|
||||
<div class="input">
|
||||
<label>Name</label>
|
||||
|
||||
<% 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 %>
|
||||
<p><%= link_to "Change your name", new_user_name_change_request_path %></p>
|
||||
</div>
|
||||
|
||||
<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.
|
||||
</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">
|
||||
<%= simple_form_for(@user, html: {id: "signup-form"}) do |f| %>
|
||||
<%= f.input :name, as: :string %>
|
||||
|
||||
@@ -3,7 +3,7 @@ require 'test_helper'
|
||||
class UserNameChangeRequestsControllerTest < ActionDispatch::IntegrationTest
|
||||
context "The user name change requests controller" do
|
||||
setup do
|
||||
@user = create(:gold_user)
|
||||
@user = create(:member_user)
|
||||
@admin = create(:admin_user)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user