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
|
||||
end
|
||||
end
|
||||
|
||||
def hidden_attributes
|
||||
if CurrentUser.is_admin? || user == CurrentUser.user
|
||||
[]
|
||||
else
|
||||
super + [:change_reason, :rejection_reason]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<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" %>
|
||||
|
||||
@@ -9,11 +11,6 @@
|
||||
<label for="desired_name">Desired Name</label>
|
||||
<%= text_field_tag "desired_name" %>
|
||||
</div>
|
||||
|
||||
<div class="input">
|
||||
<label for="desired_name">Reason</label>
|
||||
<%= text_field_tag "reason" %>
|
||||
</div>
|
||||
|
||||
<div class="input">
|
||||
<%= submit_tag "Submit", :data => { :disable_with => "Submitting..." } %>
|
||||
|
||||
Reference in New Issue
Block a user