Merge pull request #2853 from evazion/fix-name-change-api
Fix user name change reasons being public in API
This commit is contained in:
@@ -89,4 +89,12 @@ class UserNameChangeRequest < ActiveRecord::Base
|
|||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def hidden_attributes
|
||||||
|
if CurrentUser.is_admin? || user == CurrentUser.user
|
||||||
|
[]
|
||||||
|
else
|
||||||
|
super + [:change_reason, :rejection_reason]
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
<h1>Name Change Request</h1>
|
<h1>Name Change Request</h1>
|
||||||
|
|
||||||
<p>You can request a name change but it must be approved. Factors that go into consideration include your upload and update history, and your user feedback.</p>
|
<p>You can request a name change once per week. Your previous names will still
|
||||||
|
be visible on your profile to other Danbooru members, but they won't be visible
|
||||||
|
to search engines.</p>
|
||||||
|
|
||||||
<%= error_messages_for "change_request" %>
|
<%= error_messages_for "change_request" %>
|
||||||
|
|
||||||
@@ -10,11 +12,6 @@
|
|||||||
<%= text_field_tag "desired_name" %>
|
<%= text_field_tag "desired_name" %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="input">
|
|
||||||
<label for="desired_name">Reason</label>
|
|
||||||
<%= text_field_tag "reason" %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="input">
|
<div class="input">
|
||||||
<%= submit_tag "Submit", :data => { :disable_with => "Submitting..." } %>
|
<%= submit_tag "Submit", :data => { :disable_with => "Submitting..." } %>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user